Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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