Using the MediaStream API to access webcam from JavaScript:
navigator.webkitGetUserMedia("video,audio",
function(stream) {
var url = webkitURL.createObjectURL(stream);
videoTag.src = url;
videoTag.onerror = function() {
stream.stop();
alert('camera error');
};
},
function(error) {
alert(error.code);
}
);
2012-01-27
Subscribe to:
Post Comments (Atom)
About Me
Projects
- Filezoo - Minimalistic zoomable file manager
- Cake.js - JavaScript Canvas animation library
- Missile Fleet - A game written with Cake.js
- Gitbug - In-repo bug tracker for Git
- Prelude.ml - OCaml stdlib replacement with a Haskellish flavour
- Metadata - File metadata extraction tool and Ruby library
- Thumbnailer - File thumbnailing tool and Ruby library
- Random canvas demos

No comments:
Post a Comment