Created
December 1, 2017 23:06
-
-
Save robertlong/572671a7d2306670f5a995f7e01238a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ctx = new AudioContext(); | |
function createMediaStream() { | |
const mediaStream = new MediaStream(); | |
const source = ctx.createMediaStreamSource(mediaStream); | |
source.connect(ctx.destination); | |
setTimeout(() => { | |
console.log("disconnecting"); | |
source.disconnect(); | |
}, 3000); | |
} | |
setInterval(createMediaStream, 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment