Last active
August 29, 2015 14:09
-
-
Save SlyDen/be94952c521f67ab6fab to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hasGetUserMedia() { | |
return !!(navigator.getUserMedia || navigator.webkitGetUserMedia || | |
navigator.mozGetUserMedia || navigator.msGetUserMedia); | |
} | |
if (hasGetUserMedia()) { | |
alert('getUserMedia() IS supported in your browser'); | |
} else { | |
alert('getUserMedia() is not supported in your browser'); | |
} | |
OR | |
if (Modernizr.getusermedia){ | |
var gUM = Modernizr.prefixed('getUserMedia', navigator); | |
gUM({video: true}, function( //... | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment