Skip to content

Instantly share code, notes, and snippets.

@kovek
Created February 1, 2013 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kovek/4693183 to your computer and use it in GitHub Desktop.
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.
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