When a user starts or stops Screen Share, all connected users of the room are notified with screenShareStarted and screenShareStopped callbacks. As Screen-Share is also a Stream, you can play it using a Video Player. Screen Share is carried on Stream ID# 101. Client End Point must subscribe to this Stream ID to receive and play it locally.
Callbacks:
screenShareStarted– To know that a Screen Share has startedscreenShareStarted– To know that a Screen Share has stopped
// You are notified that Screen Share has started
screenShareStarted : event=>{
/* event =
{ clientId : "xxx", name : "XXX",
result : 0, streamId : 101
}
*/
// Handle UI to play Screen Share
}
// You are notified that Screen Share has stopped
screenShareStopped: event=>{
/* event =
{ clientId : "xxx", name : "XXX",
result : 0, streamId : 101
}
*/
// Handle UI to stop playing Screen Share
}
