Created
May 29, 2018 20:38
-
-
Save etr2460/6392c0e42801b95d39b3e18df597de05 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
<script> | |
navigator.mediaDevices.enumerateDevices().then(function(devices) { | |
console.log(devices); | |
navigator.mediaDevices.getUserMedia({ | |
audio: { | |
deviceId: { | |
exact: "default" | |
}, | |
echoCancellation: { | |
exact: false | |
}, | |
} | |
}).then(function(stream) { | |
console.log(stream); | |
console.log('done') | |
}).catch(function(error) { | |
console.log(error) | |
}) | |
}); | |
</script> | |
<html> | |
<body>Hello World</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment