MediaSFU React Native
    Preparing search index...

    Function connectSendTransport

    • Connects the send transport based on the specified option.

      Parameters

      Returns Promise<void>

      A promise that resolves when the transport is connected.

      Will throw an error if the connection fails.

      const options = {
      option: 'audio',
      targetOption: 'local',
      parameters: {
      audioParams: audioProducerOptions,
      videoParams: videoProducerOptions,
      localStreamScreen: localStream,
      canvasStream: canvasStream,
      whiteboardStarted: false,
      whiteboardEnded: false,
      shared: false,
      islevel: '1',
      connectSendTransportAudio: connectAudioFunction,
      connectSendTransportVideo: connectVideoFunction,
      connectSendTransportScreen: connectScreenFunction,
      },
      };

      connectSendTransport(options)
      .then(() => {
      console.log('Transport connected successfully');
      })
      .catch((error) => {
      console.error('Error connecting transport:', error);
      });