createScreenShareObject

Deprecated
View as Markdown

Deprecated. Use startScreenShare 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

opts
object

Object containing the parameters of the method.

audio
boolean | MediaTrackConstraints

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

autoJoin
boolean

Whether the screen share object should automatically join the room.

video
boolean | MediaTrackConstraints

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

Returns

Promise<RoomSessionScreenShare> - See RoomSessionScreenShare documentation for more details.

Permissions

  • room.self.screenshare

You need to specify the permissions when creating the Video Room Token on the server side.

Example

Sharing the screen together with the associated audio:

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