Skip to content

Instantly share code, notes, and snippets.

@kypflug
Created Jun 11, 2015
Embed
What would you like to do?
var audioContext = new AudioContext();
navigator.mediaDevices.getUserMedia({
audio: true
}).then(function (stream) {
var sourceNode = audioContext.createMediaStreamSource(stream);
var gainNode = audioContext.createGain();
sourceNode.connect(gainNode);
}).catch( function (error) {
console.log(error.name + ": " + error.message);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment