The ScreenshareOptions model contains additional options that you can use when you want to share a screen. This model is available in SDK 3.9 and later.
Optional sourceId: string
The ID of a device that you want to use. If you use multiple screens, use this parameter to specify which screen you want to share.
Optional audio: boolean | MediaTrackConstraints
A property that allows sending the computer's audio to remote participants while sharing a screen. It is useful if audio is an important part of your shared content. Enabling audio is supported only on Chrome and Edge for users who use the Opus codec. On Windows, the method allows sending the system's audio. However, on macOS the method allows sending audio only from a browser tab. This functionality is not supported for any other SDK, which means that participants who use, for example, the iOS SDK cannot hear the shared audio.
By default, the property is set to true on Chrome and Edge for users who use the Opus codec; on other browsers and for users who use the Dolby Voice Codec the property is set to false.
In case of experiencing audio issues while sharing system audio, see the Troubleshooting guide.
Optional video: MediaTrackConstraints
A property that allows modifying parameters of the shared screen, such as its resolution or frame rate.
Updated 6 months ago