startScreenShare(options?)
Prebuilt
Custom
Does nothing if there is no active meeting, the browser does not support screen sharing, or enable_screenshare is disabled for the room or meeting token.
Listen for local-screen-share-started to confirm sharing is active, local-screen-share-stopped when it ends, and local-screen-share-canceled if the user dismisses the picker.
Parameters
options?: DailyStartScreenShareOptions
Constraints passed to
getDisplayMedia() when Daily acquires the stream. Provide either this or mediaStream — not both.Web (Chrome/Chromium)audio(boolean | MediaTrackConstraints) — Whether to capture tab audio. Behavior when omitted is browser-dependent.video(boolean | MediaTrackConstraints) — Whether to capture video.getDisplayMedia()requires a video track, sofalsewill cause the call to reject.selfBrowserSurface('include' | 'exclude') — Whether to allow sharing the current tab. Default:'exclude'(avoids hall-of-mirrors effect). Chrome/Chromium only.surfaceSwitching('include' | 'exclude') — Whether to show a tab-switch button during sharing. Default:'include'. Chrome/Chromium only.systemAudio('include' | 'exclude') — Whether to offer system audio as a source. Chrome/Chromium only.
audio(boolean) — Whether to include audio in the stream.video.maxWidth(number, optional) — Max width for the screen share track.video.maxHeight(number, optional) — Max height for the screen share track.chromeMediaSourceId(string) — Specific screen source to share.
A
MediaStream you obtained yourself (e.g. via your own getDisplayMedia() call). Provide either this or displayMediaOptions — not both.Send settings for the screen video track. Can be used with either
displayMediaOptions or mediaStream. Accepts the same values as updateSendSettings().Return value
Returnsvoid.