Created
February 1, 2013 18:41
-
-
Save kovek/4693183 to your computer and use it in GitHub Desktop.
webkitGetUserMedia isn't working right... When you use audio:true, the browser is supposed to use the microphone. But still, it has an undefined kind...
PS: The browser is actually asking me to get access to my microphone, and I grant it.
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.webkitGetUserMedia({audio: true, video: false}, function(LocalMediaStream){ | |
audio = document.querySelector('video'); | |
if(typeof window.URL.createObjectURL(LocalMediaStream) != "undefined"){ | |
var file = window.URL.createObjectURL(LocalMediaStream); | |
audio.src = file; | |
audio.play(); | |
} | |
console.log(file); | |
console.log('>>'+LocalMediaStream.kind); // THIS WILL RETURN UNDEFINED | |
}, function(e){ | |
console.log('something happenned: ' +e); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment