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); }); Copy
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); });
Signals the creation of a new consumer transport.
Param: options
The options for signaling a new consumer transport.
Param: options.remoteProducerId
The ID of the remote producer.
Param: options.islevel
Indicates the level of the consumer.
Param: options.nsock
The socket instance for communication.
Param: options.parameters
The parameters for the transport.
Returns
A promise that resolves to an array of consuming transports or void.
Throws
Will throw an error if the signaling process fails.
Example