"Be aware that just having Youtube in your browser history is enough to deny your warranty."
Porting it to Web Audio API is left as an exercise for the reader.