#Detect if screen is being recorded by any application?

15 messages · Page 1 of 1 (latest)

dreamy fern
#

Is there a way to do this?

dreamy fern
#

I know macOS has an accessibility API which may be able to be checked, what windows?

#

Is there a bash or powershell command which will let me know whether the screen is being shared or not?

hoary mantle
#

Unfortunately there isn’t a simple “screen recording detector” built into Electron or the OS that you can just query from JavaScript. In fact, services like Netflix for example don’t actually detect a recorder process they simply render your video through a protected (DRM) pipeline that can’t be grabbed by a normal screen recorder.

#

I think Electron gives you a very easy way to prevent native screen capture on Windows and macOS:

const win = new BrowserWindow({ /* … */ });
win.setContentProtection(true);
#

this just wont tell you if someone tried to record it will stop the majority of OS/User level grabs.

#

not sure how intense of a detection you need but if that code doesnt workout for you, youll likely need to develop your own DRM Pipeline.

dreamy fern
#

@hoary mantle Thank you, that's really helpful. I mainly just want to check if there is any screen-recording present, or if the user is in a video call, and if they are, then I will run a function

hoary mantle
dreamy fern
hoary mantle
hoary mantle
dreamy fern
dreamy fern
hoary mantle