Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get a list of video cameras attached in my computer using JavaScript?

I want to display a list of video cameras attached to the user's computer, and when they select one, display streaming video from that camera in an HTML5 <video> tag.

How can I get a list of the video cameras attached to the user's computer?

like image 672
Panchotiya Vipul Avatar asked Sep 19 '13 11:09

Panchotiya Vipul


1 Answers

Perhaps Navigator.getUserMedia() (uses WebRTC under the hood) is what you're looking for, though I don't see anything that will directly tell you what devices are available (the list of devices isn't exposed to your code—it's presented to the user when asking for permission to access available hardware).

Also note the browser support: Chrome 21+, Firefox 20+, Opera 12+, no support for IE and possibly Safari.

like image 167
André Dion Avatar answered Oct 23 '22 18:10

André Dion