#Detect if screen is being recorded by any application?
15 messages · Page 1 of 1 (latest)
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?
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.
@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
You can always write soemthing that detects this using Node Native Addons basically lets you write some c++ code and create bindings for it in JavaScript / Typescript
That'w what chatgpt was saying, howveer not sure f there are any cli commands that can return that sort of information
It’s going to be platform dependent too right. There are some really best low level tricks you can do to monitor this kind of things but it’s definitely not a quick implementation by any means
I’d try this first see if it works for your use case and if not than developing something more robots would be better
yep exactly, i plan on supporting macos and windows only for now tbf
i have added this line to my code and will look into ths deeper again once i have finished some other more urgent features
I develop a lot of low level applications, I’m an embedded systems software engineer by default and if you need any help writing the c++ code for something more relevant bust feel free to DM me