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);
}
);
art with code
2012-01-27
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment