Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/infusion/jQuery-webcam
A webcam wrapper plugin for jQuery
https://github.com/infusion/jQuery-webcam
Last synced: 3 months ago
JSON representation
A webcam wrapper plugin for jQuery
- Host: GitHub
- URL: https://github.com/infusion/jQuery-webcam
- Owner: infusion
- Created: 2010-09-17T00:46:36.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2024-04-04T12:36:16.000Z (7 months ago)
- Last Synced: 2024-07-18T22:50:18.211Z (4 months ago)
- Language: ActionScript
- Homepage: http://www.xarg.org/project/jquery-webcam-plugin/
- Size: 37.1 KB
- Stars: 516
- Watchers: 64
- Forks: 272
- Open Issues: 34
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-actionscript-sorted - jQuery-webcam - A webcam wrapper plugin for jQuery (Multimedia / Camera)
README
jQuery Webcam Plugin
====================
[![CDNJS version](https://img.shields.io/cdnjs/v/jQuery-webcam.svg)](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 smalleronTick: 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("
}
}
});
```
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 documentation
==========================
For further details and code examples take a look at the demonstration and documentation page on:
[https://raw.org/article/camara-support-in-html5-and-javascript/](https://raw.org/article/camara-support-in-html5-and-javascript/)
License
======
Copyright (c) 2013, [Robert Eisele](https://raw.org/)
Dual licensed under the MIT or GPL Version 2 licenses.