I would like my chrome extension to do something unless a user is screen-sharing his/her screen or window via getDisplayMedia. Is it possible to query specific tabs or something to detect any kind of screen sharing performed via web-based applications like Team viewer, Zoom, Google Meet, Facebook Messenger, Viber, etc. in a chrome extension?
Netflix already does this without using any sort of chrome extension (albeit only when sharing entire screen, not a window or tab). The Netflix video goes black. So there must be some way with privileged access through a chrome extension?
There is some extensions that override native api. You could insert a script that overide getDisplayMedia function to 'notify' your extension of activation and then call the original one.
var saveGetDisplayMedia = navigator.mediaDevices.getDisplayMedia;
navigator.mediaDevices.getDisplayMedia = function ([arg]) {
notifyExtension(arg)
saveGetDisplayMedia.call(navifator.mediaDevice, ..arg)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With