# jQuery-webcam-plugin **Repository Path**: mirrors/jQuery-webcam-plugin ## Basic Information - **Project Name**: jQuery-webcam-plugin - **Description**: jQuery Webcam 是一款用来创建透明层与相机之间交流的 jQuery 插件 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: https://www.oschina.net/p/jquery-webcam-plugin - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2020-09-11 - **Last Updated**: 2025-12-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README jQuery Webcam Plugin ==================== [](https://cdnjs.com/libraries/jQuery-webcam) Description ----------- A small wrapper library to be able to communicate with a Flash webcam via JavaScript. Example ------ Please 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: ```html
``` ```javascript 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("