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

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -