Skip to content

Instantly share code, notes, and snippets.

@flaki
Last active January 1, 2022 17:44
Show Gist options
  • Save flaki/2e3a0f1d59ebc723fba57c9053f06765 to your computer and use it in GitHub Desktop.
Save flaki/2e3a0f1d59ebc723fba57c9053f06765 to your computer and use it in GitHub Desktop.
Console fix for mono audio in stereo videos on YouTube like this one https://youtu.be/P3X3J-8ICAo
(function(){
vid=document.querySelector('video.html5-main-video');
ct = new AudioContext();
src = ct.createMediaElementSource(vid);
splitter = ct.createChannelSplitter(2);
src.connect(splitter);
merger = ct.createChannelMerger(2);
splitter.connect(merger, 0, 0);
splitter.connect(merger, 0, 1);
merger.connect(ct.destination);
})();
@flaki
Copy link
Author

flaki commented Apr 5, 2021

Riight good catch, thanks @jcsrb fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment