enableScreenShare

fun enableScreenShare(customTrack: CustomStreamTrack, enableAudio: Boolean)

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 enabled
  • onPresenterChanged — emitted on all participants with the presenter's participant ID

Code Example:


meeting.enableScreenShare(customScreenTrack, true)

Parameters

customTrack

the CustomStreamTrack to use as the screen share source

enableAudio

true to share audio along with the screen, false otherwise