I want access webcam from HTML5 for register and save a video file, for playing later. Is this possible?
-
[Here's another SO answer](http://stackoverflow.com/questions/6976079/html-5-streaming-webcam-video/6976093#6976093) with some possibly-helpful resources. – sdleihssirhc Aug 16 '11 at 06:17
-
You can do it for Chrome and Opera but you'll have to instruct your users, because it isn't very safe yet. Here is an online example, it still requires chrome users to activate MediaStream in chrome://flags/: http://neave.com/webcam/html5/ – Moose May 25 '12 at 06:30
-
This is now possible: [Filtering a webcam using getUserMedia and HTML5 Canvas](http://www.iandevlin.com/blog/2012/06/html5/filtering-a-webcam-using-getusermedia-and-html5-canvas). – Ian Devlin Jun 25 '12 at 12:59
2 Answers
Apparently, the <device>
tag is not part of the HTML5 spec, and therefore there is no currently standard way to access webcams from a browser. You might be able to get away with using the JavaScript API navigator.getUserMedia(...)
, but that isn't supported by any browsers, either
You can read up on this here: Which web browsers support the HTML5 <device> tag?

- 1
- 1

- 39,252
- 15
- 98
- 100
I was doing similar research recently and found a working demo: http://gadgets-code.com/taking-webcam-photo-with-opera-browser-new-technology
It requires install of an experimental version of Opera: http://snapshot.opera.com/labs/camera-and-pages/
Happy hacking!
UPDATE [20 May 2012]:
http://www.webrtc.org/running-the-demos - WebRTC - GoogleChromeCanary - about://flags - enableMediaStream + PeerConnection :) Me recommends - Jerome Etienne's blog - http://learningthreejs.com/
UPDATE [13 Sep 2012]:
WebRTC enabled in Chrome 21 by default (change introduced couple weeks ago)
UPDATE [2 Jul 2014]:
WebRTC is mainstream / huge: http://youtu.be/GBAEG_RuqeE?t=50m1s (Google Hangouts, Amazon Mayday, Snapchat)

- 12,673
- 11
- 68
- 89