Agora Detect Screen Share Stream on Audience Side

Viewed 789

Does anybody know how to detect stream whether its a Screen Share or Webcam on the audience/remote Side ?

On the host side, I am able to detect but not on the audience side

I want to display screen shared remote stream in another part of the web page and webcam stream on another

2 Answers

this is currently not possible with the RTC SDK. You need to use the RTM SDK in tandem with our RTC SDK to achieve this. RTM SDK will serve as a data signaling layer for the RTC.

For ease of use, you can create an RTM channel with the same name as the RTC channel.

When you start screen share, you can signal everybody on the channel to let them know which is the screen sharing stream.

Screen share and video will come in as just video on the remote side with a callback. If you want to detect screen share vs. regular video that you need to develop some app logic on your side. For example, the screen share UID would be an integer only from 10000 to 11000 (depending on your usage, you could raise or lower this) so you know if the number comes from that range it is a screen share.

Related