MediaSFU React Native
    Preparing search index...

    Function signalNewConsumerTransport

    • Signals the creation of a new consumer transport.

      Parameters

      Returns Promise<void | string[]>

      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: '1',
      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);
      });