This file contains hidden or 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
// copy paste this in the console from youtube | |
const ctx = new AudioContext() | |
const L = ctx.createGain() | |
const R = ctx.createGain() | |
const splitter = ctx.createChannelSplitter(2) | |
ctx.createMediaElementSource($('video')).connect(splitter, 0, 0) | |
splitter.connect(L, 0) | |
splitter.connect(R, 1) | |
L.connect(ctx.destination, 0) |