The options for disconnecting the send transport.
A promise that resolves when the disconnection process is complete.
const options = {
parameters: {
screenProducer: screenProducerInstance,
socket: socketInstance,
localSocket: localSocketInstance,
roomName: 'Room 1',
updateScreenProducer: (producer) => console.log('Updated screen producer:', producer),
updateLocalScreenProducer: (localProducer) => console.log('Updated local screen producer:', localProducer),
getUpdatedAllParams: () => ({
screenProducer: screenProducerInstance,
socket: socketInstance,
roomName: 'Room 1',
}),
},
};
disconnectSendTransportScreen(options)
.then(() => {
console.log('Screen send transport disconnected successfully');
})
.catch((error) => {
console.error('Error disconnecting screen send transport:', error);
});
Disconnects the send transport for screen sharing.
This function closes the screen producer, updates the state, and notifies the server about the closure and pausing of screen sharing.