startScreenShare( { chromeMediaSourceId?, mediaStream? } )


Starts a screen share from the local participant. If there is no meeting, or this is not a browser that supports screen sharing, or enable_screenshare is set to false for either the room or the meeting token, this method does nothing.

You may optionally pass a mediaStream property to the startScreenShare() configuration object parameter. The value of the property should be an instance of MediaStream.

There's no way to know if the user ignores or cancels the browser's screen share confirmation dialog.

To confirm that screen sharing started, listen for participant-updated events and check the local user's screen property.

Returns null.

Building with Electron If you're building an Electron app, pass { chromeMediaSourceId }, to set the screen to be shared.