在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:infusion/jQuery-webcam开源软件地址:https://github.com/infusion/jQuery-webcam开源编程语言:ActionScript 84.3%开源软件介绍:jQuery Webcam PluginDescriptionA small wrapper library to be able to communicate with a Flash webcam via JavaScript. ExamplePlease note: The camera doesn't work if you have any dom-errors on your page! The Flash object will be embedded into the following 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>");
}
}
});
If you want to draw the picture onto a canvas, have a look at the source of the page on my blog, linked below. Further examples and documentationFor further details and code examples take a look at the demonstration and documentation page on: http://www.xarg.org/project/jquery-webcam-plugin/ LicenseCopyright (c) 2013, Robert Eisele Dual licensed under the MIT or GPL Version 2 licenses. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论