Created
May 11, 2017 12:52
-
-
Save jimbuck/f66197820fa943e4bed456d644f48406 to your computer and use it in GitHub Desktop.
Get List of Media Devices (not streams)
This file contains 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.map(d => `[${d.kind}] ${d.label}`)) | |
.then(console.log.bind(console)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment