100mslive / 100ms-web

A conferencing and streaming UI built with 100ms SDK.
https://examples-videoconferencing.app.100ms.live/preview/tmz-qdi-cyp
MIT License
198 stars 164 forks source link

Feature Request: Top Level API for controlling remote peers screensharing #634

Open tylerzey opened 2 years ago

tylerzey commented 2 years ago

Is your feature request related to a problem? Please describe. Roles currently allow individuals to control remote audio and video settings. However, they do not allow a role to control a remove user's screenshare. It looks like the demo application uses a custom event workaround as seen here:

https://github.com/100mslive/100ms-web/blob/f67d7aabf39595234a8f60a96becb874250104ce/src/plugins/RemoteStopScreenshare.jsx

Describe the solution you'd like It would be great if this was a top-level feature just like muting a remote peers audio/video

Describe alternatives you've considered I could use the custom event method.

arjunattam commented 1 year ago

Thanks for sharing this request @tylerzey - we're looking into it. Any downside that you ran into with the workaround?

tylerzey commented 1 year ago

Hi @arjunattam!

Thanks for writing back.

Yes, there is one downside. Unlike audio permissions that are controlled on a role basis, now, technically any role can emit this event and stop anyone's video.

While it's unlikely given my use case for this to be abused, the current implementation is very much a workaround.

Also, when first implementing 100ms, it's odd to see APIs support av controls:

hmsActions.setRemoteTrackEnabled hmsActions.changeRole hmsActions.removePeer

But then nothing for screen sharing.

arjunattam commented 1 year ago

Got it, thanks for the inputs