> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daily.co/llms.txt
> Use this file to discover all available pages before exploring further.

# startScreenShare()

> Starts a screen share from the local participant.

`startScreenShare(options?)`

<Badge color="green">{"✓"} Prebuilt</Badge> <Badge color="green">{"✓"} Custom</Badge>

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`](/reference/daily-js/events/media-events#local-screen-share-started) to confirm sharing is active, [`local-screen-share-stopped`](/reference/daily-js/events/media-events#local-screen-share-stopped) when it ends, and [`local-screen-share-canceled`](/reference/daily-js/events/media-events#local-screen-share-canceled) if the user dismisses the picker.

## Parameters

`options?: DailyStartScreenShareOptions`

<ParamField body="displayMediaOptions" type="DailyDisplayMediaStreamOptions | DailyDisplayMediaStreamOptionsElectron">
  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, so `false` will 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.

  **Electron**

  * `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.
</ParamField>

<ParamField body="mediaStream" type="MediaStream">
  A `MediaStream` you obtained yourself (e.g. via your own `getDisplayMedia()` call). Provide either this or `displayMediaOptions` — not both.

  <Warning>
    When you provide `mediaStream`, you are responsible for stopping the track when the share ends. Daily will handle cleanup if the user stops sharing via the browser UI, but you must stop the track explicitly when calling `stopScreenShare()`.
  </Warning>
</ParamField>

<ParamField body="screenVideoSendSettings" type="DailyVideoSendSettings | DailyScreenVideoSendSettingsPreset">
  Send settings for the screen video track. Can be used with either `displayMediaOptions` or `mediaStream`. Accepts the same values as [`updateSendSettings()`](/reference/daily-js/instance-methods/update-send-settings).
</ParamField>

## Return value

Returns `void`.

## Example

```javascript theme={null}
// Default — browser picks the screen
call.startScreenShare();

// Custom constraints and send settings
call.startScreenShare({
  displayMediaOptions: {
    audio: false,
    selfBrowserSurface: 'exclude',
    surfaceSwitching: 'include',
    video: { width: 1920, height: 1080 },
  },
  screenVideoSendSettings: 'motion-and-detail-balanced',
});
```

## See also

<CardGroup>
  <Card title="Methods" icon="code" iconType="solid">
    * [stopScreenShare()](/reference/daily-js/instance-methods/stop-screen-share)
    * [updateSendSettings()](/reference/daily-js/instance-methods/update-send-settings)
  </Card>

  <Card title="Events" icon="bolt" iconType="solid">
    * [local-screen-share-started](/reference/daily-js/events/media-events#local-screen-share-started)
    * [local-screen-share-stopped](/reference/daily-js/events/media-events#local-screen-share-stopped)
    * [local-screen-share-canceled](/reference/daily-js/events/media-events#local-screen-share-canceled)
  </Card>

  <Card title="Guides" icon="book-open" iconType="solid">
    * [Screen sharing](/docs/daily-js/features/screen-sharing)
  </Card>

  <Card title="REST API" icon="server" iconType="solid">
    * [Create room: enable\_screenshare](/reference/rest-api/rooms/create-room#body-properties-enable-screenshare)
    * [Meeting token: enable\_screenshare](/reference/rest-api/meeting-tokens/create-meeting-token#body-properties-enable-screenshare)
  </Card>
</CardGroup>
