Check if user has webcam or not using JavaScript only? -


is possible figure out whether user has webcam or not using javascript? don't want use plugin this.

you can use new html5 api check if give permission use webcam. after all, if deny permission, might not have webcam, code's perspective.

see navigator.getusermedia().

edit:

navigator.getmedia = ( navigator.getusermedia || // use proper vendor prefix                        navigator.webkitgetusermedia ||                        navigator.mozgetusermedia ||                        navigator.msgetusermedia);  navigator.getmedia({video: true}, function() {   // webcam available }, function() {   // webcam not available }); 

Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -