Bruno Vasconcelos
Bruno Vasconcelos

Reputation: 179

Is there a way to watch webcam activation event?

I'm creating a background app in electron and the objective is to send a notification every time the webcam is activated.

Is there a way to catch those webcam activation events from system to trigger a function?

Upvotes: 0

Views: 241

Answers (1)

Codebreaker007
Codebreaker007

Reputation: 2989

There is no "clean" solution in javascript.

  • First you have to take the accepted answer in that post
  • to not use jQuery you have to extract the relevant function(s) from the jQuery source
  • Then you have to have permission to access the camera.
  • The js doing that has either to run over https or from a local file

So the good news is its doable. Even trying that with C# or C++ directly on the OS-level is a PITA.

Upvotes: 1

Related Questions