作者:每天还贷的飞鱼 | 来源:互联网 | 2023-05-17 21:31
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.
我在我正在研究的网站上使用这个jQuery网络摄像头插件。如果你去网站,你会发现它使用闪存,你必须点击'接受'才能使它工作。
I want to determine if the webcam is active (on) or not. How can I do this with Javascript/jquery?
我想确定网络摄像头是否处于活动状态(打开)。我怎么能用Javascript / jquery做到这一点?
In other words, what do I substitute in the if statement here?
换句话说,我在if语句中替换了什么?
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.
我远非Javascript和jquery的专家,所以真正的代码将非常感激。
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.
此外,如果有人可以告诉我如何捕获网络摄像头被激活的事件,也将非常感激。如果你无法弄清楚,不要担心。
4 个解决方案