ProducerClosed
Service to manage the closing of a producer, including resizing video elements and updating consumer transports.
producerClosed Closes a specific producer by its ID, adjusts any associated video elements, and updates the list of consumer transports.
Options for closing the specified producer.
Unique ID for the producer to close.
Parameters to configure the producer closure and related updates.
A promise that resolves when the producer has been closed and relevant updates have been made.
await producerClosedService.producerClosed({ remoteProducerId: 'producer123', parameters: { consumerTransports: currentTransports, screenId: 'screen123', updateConsumerTransports: updateTransportList, closeAndResize: closeAndResizeFunction, getUpdatedAllParams: getUpdatedParamsFunction, }}); Copy
await producerClosedService.producerClosed({ remoteProducerId: 'producer123', parameters: { consumerTransports: currentTransports, screenId: 'screen123', updateConsumerTransports: updateTransportList, closeAndResize: closeAndResizeFunction, getUpdatedAllParams: getUpdatedParamsFunction, }});
Handles the closing of a producer and resizes video elements.
The options object containing necessary variables.
Service
ProducerClosed
Description
Service to manage the closing of a producer, including resizing video elements and updating consumer transports.
Method
producerClosed Closes a specific producer by its ID, adjusts any associated video elements, and updates the list of consumer transports.
Param: options
Options for closing the specified producer.
Param: options.remoteProducerId
Unique ID for the producer to close.
Param: options.parameters
Parameters to configure the producer closure and related updates.
Returns
A promise that resolves when the producer has been closed and relevant updates have been made.
Example