Skip to content

Instantly share code, notes, and snippets.

View Flodip's full-sized avatar

Florentin Di Prinzio Flodip

  • Belgium
View GitHub Profile
// 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)