Const
The function to update the local video producer state (optional).
The function to update the local producer transport state (optional).
The function to update the producer transport state (optional).
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));
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.