Welcome to the new Daily Docs. Please let us know what you think.

startScreenShare()

startScreenShare( { chromeMediaSourceId } )

Compatibility:
Prebuilt
Custom

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.

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.

Experimental parameters

You can optionally pass an audio track to startScreenShare(). This will show up in the participant record as screenAudio with corresponding track-started and track-stopped events.