> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# createScreenShareObject

> createScreenShareObject method for the RoomSession class.

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

Deprecated. Use [startScreenShare](/docs/browser-sdk/v3/js/reference/video/room-session/start-screen-share) instead.

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

#### Parameters

Object containing the parameters of the method.

Audio constraints to use when joining the room. Default: `true`.

Whether the screen share object should automatically join the room.

Video constraints to use when joining the room. Default: `true`.

#### 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.

#### Example

Sharing the screen together with the associated audio:

```javascript
await roomSession.createScreenShareObject({ audio: true, video: true });
```