Class SignalNewConsumerTransport

Signals the creation of a new consumer transport.

The options for signaling a new consumer transport.

The ID of the remote producer.

Indicates the level of the consumer.

The socket instance for communication.

The parameters for the transport.

A promise that resolves to an array of consuming transports or void.

Will throw an error if the signaling process fails.

const options = {
remoteProducerId: 'producer-id',
islevel: true,
nsock: socketInstance,
parameters: {
device: mediaDevice,
consumingTransports: [],
lock_screen: false,
updateConsumingTransports: updateFunction,
connectRecvTransport: connectFunction,
reorderStreams: reorderFunction,
getUpdatedAllParams: getUpdatedParamsFunction,
},
};

signalNewConsumerTransport(options)
.then(consumingTransports => {
console.log('Consuming Transports:', consumingTransports);
})
.catch(error => {
console.error('Error signaling new consumer transport:', error);
});

Constructors

Methods