Skip to content

Instantly share code, notes, and snippets.

@emlautarom1
Created August 13, 2021 18:14
Show Gist options
  • Save emlautarom1/71e67c980a8220f7f8a90250a2feaaaf to your computer and use it in GitHub Desktop.
Save emlautarom1/71e67c980a8220f7f8a90250a2feaaaf to your computer and use it in GitHub Desktop.
Fix Youtube single-channel audio
/*
* Fix playback of videos where audio is playing from just one side.
* Just copy-paste into your browser console and run the code.
*/
var context = new AudioContext();
var videos = document.getElementsByTagName("video");
var audioElement = context.createMediaElementSource(videos[0]);
context.destination.channelCount = 1;
audioElement.connect(context.destination)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment