Created
August 13, 2021 18:14
-
-
Save emlautarom1/71e67c980a8220f7f8a90250a2feaaaf to your computer and use it in GitHub Desktop.
Fix Youtube single-channel audio
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
/* | |
* 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