*** id: b9da829c-670b-4c4f-8e06-7d9e3b776b42 title: createScreenShareObject slug: /js/reference/video/room-session/create-screen-share-object description: createScreenShareObject method for the RoomSession class. max-toc-depth: 3 availability: deprecated ------------------------ * **createScreenShareObject**(`opts`): `Promise` - 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` - 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/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 }); ```