***

id: f09b8220-8acc-4e19-b85d-c21bcf6b405b
title: startScreenShare
slug: /js/reference/video/room-session/start-screen-share
description: startScreenShare method for the RoomSession class.
max-toc-depth: 3
----------------

### startScreenShare

* **startScreenShare**(`opts`): `Promise<RoomSessionScreenShare>` - See [RoomSessionScreenShare documentation](/docs/browser-sdk/v3/js/reference/video/room-session-screen-share) for more details.

Adds a screen sharing instance to the room. You can create multiple screen sharing instances and add all of them to the room.

#### Parameters

<ParamField path="opts" type="object" toc={true}>
  Object containing the parameters of the method.
</ParamField>

<Indent>
  <ParamField path="audio" type="boolean | MediaTrackConstraints" required={false} toc={true}>
    Audio constraints to use when joining the room. Default: `false`.
  </ParamField>

  <ParamField path="autoJoin" type="boolean" required={false} toc={true}>
    Whether the screen share object should automatically join the room. Default: `true`.
  </ParamField>

  <ParamField path="layout" type="string" required={false} toc={true}>
    Layout to switch to as soon as the screen share joins the room.
  </ParamField>

  <ParamField path="positions" type="VideoPositions" required={false} toc={true}>
    Layout positions to assign as soon as the screen share joins the room.
  </ParamField>

  <ParamField path="video" type="boolean | MediaTrackConstraints" required={false} toc={true}>
    Video constraints to use when joining the room. Default: `true`.
  </ParamField>
</Indent>

#### Returns

`Promise<RoomSessionScreenShare>` - See [RoomSessionScreenShare documentation](/docs/browser-sdk/v3/js/reference/video/room-session-screen-share) for more details.

#### Permissions

* `room.self.screenshare`

You need to specify the permissions when [creating the Video Room Token](/docs/apis/rest/video/room-tokens/create-room-token) on the server side.

#### Examples

Sharing the screen together with the associated audio:

```js
await roomSession.startScreenShare({ audio: true, video: true });
```

Sharing the screen while changing layout:

```js
await roomSession.startScreenShare({
  audio: true,
  video: true,
  layout: "screen-share",
  positions: {
    self: "reserved-1",
  },
});
```
