Skip to content

Instantly share code, notes, and snippets.

@hughrawlinson
Last active June 3, 2022 14:26
Show Gist options
  • Save hughrawlinson/8564b278f35e7b302b57c192de317010 to your computer and use it in GitHub Desktop.
Save hughrawlinson/8564b278f35e7b302b57c192de317010 to your computer and use it in GitHub Desktop.
/*
If like me you find the EMFCamp stream audio to be too quiet to hear,
FIRST TURN YOUR VOLUME TO ZERO. NOT MUTE. ZERO.
Then run this snippet, and slowly turn the volume back up to a comfortable level.
WARNING: If you don't turn your volume to ZERO and slowly turn up to a comfortable level,
you risk damaging your speakers, your hearing, and the hearing of those in earshot.
It's possible that the broadcast audio level will come up. In that case just refresh the
page, which will remove this javascript.
The EMFCamp stream is here: https://streaming.media.ccc.de/emf2022/stagea/hls
*/
const ctx = new AudioContext();
const videoNode = new MediaElementAudioSourceNode(ctx, {mediaElement: document.querySelector('video')});
const gainNode = new GainNode(ctx);
videoNode.connect(gainNode);
gainNode.connect(ctx.destination);
gainNode.gain.value = 8;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment