Skip to content

Instantly share code, notes, and snippets.

@ghchinoy
Created June 5, 2014 15:06
Show Gist options
  • Save ghchinoy/88b4c90ac50c52ce9e15 to your computer and use it in GitHub Desktop.
Save ghchinoy/88b4c90ac50c52ce9e15 to your computer and use it in GitHub Desktop.
A test of Chromium 37.0.2032.0 275078 navigator.getMediaDevices http://dev.w3.org/2011/webrtc/editor/getusermedia.html#enumerating-devices
<!DOCTYPE html>
<html lang="en">
<head>
<title>devices</title>
</head>
<body>
<script type="text/javascript">
navigator.getMediaDevices(function(deviceInfoList) {
deviceInfoList.forEach(function(deviceInfo) {
console.log('Label: ', deviceInfo.label);
console.log('Kind: ', deviceInfo.kind);
console.log('DeviceID: ', deviceInfo.deviceId);
console.log('GroupID: ', deviceInfo.groupId);
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment