Processes consumer transports for audio streams by pausing and resuming them based on their current state and the provided streams.
This method checks the state of each audio consumer transport and either pauses or resumes it depending on the presence of its producer ID in the provided list of streams.
It uses a sleep function to introduce a delay between the pause and resume operations to ensure smooth transitions.
Param: options
The options for processing consumer transports.
Param: options.consumerTransports
The list of consumer transports to process.
Param: options.lStreams
The list of local streams to check against.
Param: options.parameters
Additional parameters for processing.
Param: options.parameters.sleep
A function to pause execution for a specified duration.
Returns
A promise that resolves when the processing is complete.
Throws
Will throw an error if there is an issue processing the consumer transports.
Processes consumer transports for audio streams by pausing and resuming them based on their current state and the provided streams.
This method checks the state of each audio consumer transport and either pauses or resumes it depending on the presence of its producer ID in the provided list of streams. It uses a sleep function to introduce a delay between the pause and resume operations to ensure smooth transitions.
Param: options
The options for processing consumer transports.
Param: options.consumerTransports
The list of consumer transports to process.
Param: options.lStreams
The list of local streams to check against.
Param: options.parameters
Additional parameters for processing.
Param: options.parameters.sleep
A function to pause execution for a specified duration.
Returns
A promise that resolves when the processing is complete.
Throws
Will throw an error if there is an issue processing the consumer transports.
Example