I’m using this jQuery webcam plugin in a website I’m working on. If you go to the website, you’ll notice it uses flash, and you have to click ‘accept’ in order to get it to work.
I want to determine if the webcam is active (on) or not. How can I do this with javascript/jquery?
In other words, what do I substitute in the if statement here?
function capture_image(){
if(webcam.muted == true) {alert("hey");}
I’m far from a pro in javascript and jquery, so real code would be much appreciated.
Also, if someone could tell me how to capture the event of the webcam being activated, it would also be much appreciated. If you can’t figure it out, don’t worry about it.
Add the following function to the
debugoption of the webcam.We cannot test for inactivity to be true (i.e.
muted === true) but now we can test forwebcam.startedbeingtrueorundefined/false:How to capture the event
There is not an event per se, other than the
debugevent. You could make one…First do the following:
Next add a function to our new event
webcam.onStarted: