MediaSFU React Native
    Preparing search index...

    Function connectRecvTransport

    • Connects the receiving transport to consume media from a remote producer.

      Parameters

      Returns Promise<void>

      A promise that resolves when the connection is established.

      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);
      });