Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function gotStream(stream) {
- window.AudioContext = window.AudioContext || window.webkitAudioContext;
- var audioContext = new AudioContext();
- // Create an AudioNode from the stream
- var mediaStreamSource = audioContext.createMediaStreamSource(stream);
- // Connect it to destination to hear yourself
- // or any other node for processing!
- mediaStreamSource.connect(audioContext.destination);
- }
- navigator.getUserMedia({audio:true}, gotStream);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement