Skip to content

Instantly share code, notes, and snippets.

@ishan1608
Last active August 29, 2015 14:01
Show Gist options
  • Save ishan1608/0b12c1a356ade6ce01f0 to your computer and use it in GitHub Desktop.
Save ishan1608/0b12c1a356ade6ce01f0 to your computer and use it in GitHub Desktop.
This is the test to see the availability of user media in chrome.
// The format for getting user media stream in chrome.
// navigator.webkitGetUserMedia(constraints, successCallback, errorCallback);
navigator.webkitGetUserMedia(
{
video:true
},
function(stream) {
console.log('Got a video stream');
},
function(error) {
console.log('navigator.webkitGetUserMedia error');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment