Connects the receiving transport to consume media from a remote producer.
Will throw an error if the connection or consumption fails.
const options = { consumerTransport, remoteProducerId: 'producer-id', serverConsumerTransportId: 'transport-id', nsock: socket, parameters: connectRecvTransportOptions,};connectRecvTransport(options) .then(() => { console.log('Transport connected and consuming media'); }) .catch((error) => { console.error('Error connecting transport:', error); }); Copy
const options = { consumerTransport, remoteProducerId: 'producer-id', serverConsumerTransportId: 'transport-id', nsock: socket, parameters: connectRecvTransportOptions,};connectRecvTransport(options) .then(() => { console.log('Transport connected and consuming media'); }) .catch((error) => { console.error('Error connecting transport:', error); });
The options for connecting the receiving transport.
A promise that resolves when the connection is established.
Connects the receiving transport to consume media from a remote producer.
Throws
Will throw an error if the connection or consumption fails.
Example