Last active
August 7, 2018 07:13
-
-
Save imaustink/424e56c2dfaa6ae0183505f7eb59cf24 to your computer and use it in GitHub Desktop.
A demo of the enumerateDevices API
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
navigator.mediaDevices.enumerateDevices() | |
.then(devices => { | |
devices.forEach(device => { | |
console.log(`${device.kind}: ${device.label}`) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment