MediaSFU React Native
    Preparing search index...

    Function startShareScreen

    • Starts the screen sharing process.

      Parameters

      Returns Promise<void>

      A promise that resolves when the screen sharing process is complete.

      Will log an error message if there is an issue starting the screen share.

      const options = {
      parameters: {
      shared: false,
      showAlert: showAlertFunction,
      updateShared: updateSharedFunction,
      mediaDevices: navigator.mediaDevices,
      onWeb: true,
      targetWidth: 1280,
      targetHeight: 720,
      streamSuccessScreen: streamSuccessFunction,
      },
      };

      startShareScreen(options)
      .then(() => {
      console.log('Screen sharing started successfully');
      })
      .catch(error => {
      console.error('Error starting screen share:', error);
      });