var getUserMedia;
var browserUserMedia = navigator.webkitGetUserMedia || // WebKit
navigator.mozGetUserMedia || // Mozilla FireFox
navigator.getUserMedia; // 2013...
if ( !browserUserMedia ) throw 'Your browser doesn\'t support WebRTC';
getUserMedia = browserUserMedia.bind( navigator );
getUserMedia(
{
audio: true
},
function( stream ) {
var audioContext = new AudioContext();
var input = audioContext.createMediastreamSource(stream);
});