请注意:您的相机摄像头工作正常
Flash对象将被嵌入到下面的div:
1 | <div id="webcam"></div> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | 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>"); } }}); |
特别申明:
本站所有资源都是由网友投稿发布,或转载各大下载站,请自行检测软件的完整性!
本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!
如有侵权请联系我们删除下架,联系方式:lei1294551502@163.com