Created
July 23, 2013 18:24
-
-
Save nickdiego/6064829 to your computer and use it in GitHub Desktop.
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
<html> | |
<body> | |
<script> | |
document.write("Trying to get a Stream Audio...</br>"); | |
navigator.webkitGetUserMedia({ "audio": true, "video": false }, gotStream, logError); | |
function gotStream (stream) { | |
document.write("Got a Stream Audio!</br>"); | |
window.AudioContext = window.webkitAudioContext; | |
var audioContext = new AudioContext(); | |
var mediaStreamSource = audioContext.createMediaStreamSource( stream ); | |
mediaStreamSource.connect( audioContext.destination ); | |
} | |
function logError (error) { | |
document.write("Got an Error!</br>"); | |
document.write(error.name + ": " + error.message); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment