Class ConsumerResume

Resumes a consumer, making it ready for use.

The options for resuming the consumer.

The media stream track associated with the resumed consumer.

The type of media ('audio' or 'video') being resumed.

The ID of the remote producer associated with the resumed consumer.

Additional parameters related to the resumed consumer.

The parameters object containing various utility functions and state.

The socket associated with the consumer.

The consumer to resume.

Will throw an error if an issue occurs during the consumer resumption.

const options = {
track: mediaStreamTrack, // MediaStreamTrack to be resumed
remoteProducerId: 'producer-id', // Remote producer ID
params: {
id: 'consumer-id',
producerId: 'producer-id',
kind: 'audio',
rtpParameters: {},
},
parameters: consumerResumeParameters, // Parameters for the consumer
nsock: socket, // Socket for communication
consumer: consumer, // Consumer to resume
};

consumerResume(options)
.then(() => {
console.log('Consumer resumed successfully');
})
.catch((error) => {
console.error('Error resuming consumer:', error);
});

Constructors

Methods

Constructors

Methods