Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access camera from a browser

Is it possible to access the camera (built-in on Apples) from a browser?

Optimal solution would be client-side javascript. Looking to avoid using Java or Flash.

like image 880
Justin Avatar asked Aug 19 '12 06:08

Justin


People also ask

How do I access my camera in HTML?

With navigator. getUserMedia() , we can finally tap into webcam and microphone input without a plugin. Camera access is now a call away, not an install away. It's baked directly into the browser.

Why can't chrome access my camera?

Check your browser permissions On Chrome or Microsoft Edge: Open the menu (the three dots ⋮) in the top, right-hand corner of your browser. Select Settings > Privacy & Security > Site Settings. Ensure that your Camera and Microphone both have Ask before accessing set to ON.


1 Answers

The HTML5 spec does allow accessing the webcamera, but last I checked, it is far from finalized, and has very, very little browser support.

This is a link to get you started: http://www.html5rocks.com/en/tutorials/getusermedia/intro/

You'll probably have to use flash if you want it to work cross-browser.

W3 draft

like image 141
xbonez Avatar answered Sep 20 '22 11:09

xbonez