网页上的Jquery网络摄像头需要帮助 [英] Jquery Webcam on webpage help needed
问题描述
我正在尝试在我的网页上安装网络摄像头.
Im trying to get webcam on my webpage.
我的jquery代码:
my jquery code:
$("#camera").webcam({
width: 320,
height: 240,
mode: "callback",
swffile: "webcam/jscam.swf",
});
我对网络摄像头的身体代码:
my body code for the webcam:
<div id="camera"></div>
我正在使用此插件:
http://www.xarg.org/project/jquery-webcam-plugin/
im using this plugin:
http://www.xarg.org/project/jquery-webcam-plugin/
但是在我的页面上我什么都没看到.它是空的.
有人知道我缺少使网络摄像头正常工作的东西.
but on my page i dont see anything. it's empty.
someone know what im missing to make the webcam work.
谢谢.
推荐答案
一个猜测,但是由于您使用的是回调模式,您是否尝试像示例中那样添加回调配置?
A guess, but since you're using the callback mode did you try adding callback config like in the example ?
onTick: function() {},
onSave: function() {},
onCapture: function() {},
debug: function() {},
onLoad: function() {}
还有任何错误吗?你检查萤火虫了吗?
Also do have any error? Did you check with firebug ?
1/确保您已加载JS库.
1/ Ensure you loaded the JS lib.
2/尝试将它们放入document.ready中:
2/ Try to put them in document.ready :
$(document).ready(function(){
// Your code here
});
这篇关于网页上的Jquery网络摄像头需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!