Disconnects the send transport for video, closes the video producer, and updates the state.
This function supports both a primary and a local video producer, delegating local handling to a separate function.
Throws an error if the disconnection process fails.
const options = { parameters: { videoProducer: videoProducerInstance, localVideoProducer: localVideoProducerInstance, socket: socketInstance, localSocket: localSocketInstance, islevel: '2', roomName: 'Room A', updateMainWindow: false, lock_screen: false, updateUpdateMainWindow: (state) => console.log('Main window updated:', state), updateVideoProducer: (producer) => console.log('Video producer updated:', producer), updateLocalVideoProducer: (producer) => console.log('Local video producer updated:', producer), reorderStreams: reorderStreamsFunction, },};disconnectSendTransportVideo(options) .then(() => console.log('Video send transport disconnected successfully')) .catch((error) => console.error('Error disconnecting video send transport:', error)); Copy
const options = { parameters: { videoProducer: videoProducerInstance, localVideoProducer: localVideoProducerInstance, socket: socketInstance, localSocket: localSocketInstance, islevel: '2', roomName: 'Room A', updateMainWindow: false, lock_screen: false, updateUpdateMainWindow: (state) => console.log('Main window updated:', state), updateVideoProducer: (producer) => console.log('Video producer updated:', producer), updateLocalVideoProducer: (producer) => console.log('Local video producer updated:', producer), reorderStreams: reorderStreamsFunction, },};disconnectSendTransportVideo(options) .then(() => console.log('Video send transport disconnected successfully')) .catch((error) => console.error('Error disconnecting video send transport:', error));
The options for disconnecting the send transport.
A promise that resolves when the disconnection process is complete.
Disconnects the send transport for video, closes the video producer, and updates the state.
This function supports both a primary and a local video producer, delegating local handling to a separate function.
Throws
Throws an error if the disconnection process fails.
Example