enable Screen Share
This method can be used to enable screen sharing for the local participant using a custom stream track.
Events:
onStreamEnabled— emitted on all participants when the screen-share stream is enabledonPresenterChanged— emitted on all participants with the presenter's participant ID
Requires a joined meeting. Called before join completes (error code 3001) or while the meeting is reconnecting (error code 3014), the call emits onError locally and releases customTrack: screen capture and the screen-share service are stopped and the track is disposed, so it cannot be reused afterwards.
Code Example:
meeting.enableScreenShare(customScreenTrack, true)
Content copied to clipboard
Parameters
custom Track
the CustomStreamTrack to use as the screen share source
enable Audio
true to share audio along with the screen, false otherwise