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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With