Created
December 6, 2018 23:15
-
-
Save zipcode/961ecb631bc89d498fccaa5c3331242b to your computer and use it in GitHub Desktop.
reverb that video
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
ctx=new AudioContext();c=ctx.createConvolver();i=document.createElement("input");i.setAttribute("type","file");r=new FileReader();i.onchange=()=>r.readAsArrayBuffer(i.files[0]);r.onload=()=>{ctx.decodeAudioData(r.result,(b)=>{c.buffer=b;c.connect(ctx.destination);m=ctx.createMediaElementSource(document.querySelector("video"));m.connect(c)})};i.click() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment