所属分类:独立的部件
jQuery摄像头插件jquery-webcam-plugin
134834 浏览
413 收藏
51 留言
插件描述
这是一个封装了摄像功能的jQuery插件。它可以通过一个透明的层直接与JavaScript交互
详细内容
例子
请注意:您的相机摄像头工作正常
Flash对象将被嵌入到下面的div:
<div id="webcam"></div>
jQuery("#webcam").webcam({
width: 320,
height: 240,
mode: "callback",
swffile: "jscam_canvas_only.swf", // canvas only doesn't implement a jpeg encoder, so the file is much smaller
onTick: function(remain) {
if (0 == remain) {
jQuery("#status").text("Cheese!");
} else {
jQuery("#status").text(remain + " seconds remaining...");
}
},
onSave: function(data) {
var col = data.split(";");
// Work with the picture. Picture-data is encoded as an array of arrays... Not really nice, though =/
},
onCapture: function () {
webcam.save();
// Show a flash for example
},
debug: function (type, string) {
// Write debug information to console.log() or a div, ...
},
onLoad: function () {
// Page load
var cams = webcam.getCameraList();
for(var i in cams) {
jQuery("#cams").append("<li>" + cams[i] + "</li>");
}
}
});关键词:jQuery摄像头插件jquery-webcam-plugin,jQuery插件,网络摄像头插件,jQuery,摄像头,摄像头
讨论这个项目 (51)
共 51 条留言,当前展示最近 15 条顶层留言及回复。
更多留言 →当前页面为只读展示,仅显示已审核留言;提交留言功能暂未开放。
这个要怎么兼容移动端自带浏览器?
这个项目的缺点就是改变 摄像的宽度和高度 ,其他的都挺好的,可是不知道官方为什么不能给属性配置宽度和高度, 希望能够改善
最近想做一个web拍照上传的功能 求大神告知拍照上传怎么写 我的qq 2252385671
谷歌不行了,开启摄像头需要https协议