[英]Asp.net Jquery Webcam
I have 2 webcam connected to my pc. 我有2个网络摄像头连接到我的电脑。 I am using this library https://github.com/infusion/jQuery-webcam .
我正在使用这个库https://github.com/infusion/jQuery-webcam 。
I am able to view the webcam no problem and I can also change to other camera by right clicking, and the Adobe Flash Player will popup where I can select other camera. 我可以查看网络摄像头,没有问题,也可以通过右键单击更改为其他摄像头,然后将弹出Adobe Flash Player,从中可以选择其他摄像头。
Following this website: http://sshilko.com/examples/jQuery-AS3-Webcam/example.html 跟随此网站: http : //sshilko.com/examples/jQuery-AS3-Webcam/example.html
The example shown in that website, it can change the camera by selecting from the dropdownlist. 该网站上显示的示例,它可以通过从下拉列表中进行选择来更改相机。
But my code stucks at 但是我的代码卡在
debug: function (type, string) {
if (type == 'error') {
$("#lblCameraList").html(string);
} else {
$("#lblCameraList").html('');
}
},
Error says "No camera mode present, falling back...". 错误显示“不存在相机模式,后退...”。
Below that code is another code 该代码下面是另一个代码
cameraEnabled: function () {
this.debug('notice', 'Camera enabled');
var cameraApi = this;
if (cameraApi.isCameraEnabled) {
return;
} else {
cameraApi.isCameraEnabled = true;
}
var cams = cameraApi.getCameraList();
for (var i in cams) {
$("#cboCamera").append("<asp:ListItem Value='" + i + "'>" + cams[i] + "</asp:ListItem>");
}
$("#cboCamera").change(function () {
var success = cameraApi.setCamera($(this).val());
if (!success) {
//webcam.debug('error', 'Unable to select camera');
console.log("Failed to set camera");
} else {
//webcam.debug('notice', 'Camera Changed');
console.log("Success set camera");
}
});
The program wont event enter this cameraEnabled because of the error. 程序不会因为该错误事件而进入此cameraEnabled。 Any helps?
有帮助吗?
Problem solved. 问题解决了。 I followed exactly from this website http://sshilko.com/examples/jQuery-AS3-Webcam/example.html
我完全从此网站http://sshilko.com/examples/jQuery-AS3-Webcam/example.html进行了跟踪
The error was i was not using the same javascript file as the website. 错误是我没有使用与网站相同的javascript文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.