Created
January 20, 2018 12:05
-
-
Save pavle-goloskokovic/50a0c5332f3f3b93aa275d2243203b3b to your computer and use it in GitHub Desktop.
First we need to instantiate an audio context to be able to do any audio manipulation...
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
var AudioContext = window.AudioContext || window.webkitAudioContext; | |
var context = new AudioContext(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I’ve created an npm package called web-audio-touch-unlock
that exposes this method and makes it easy to use in your own projects.
Just pass your AudioContext instance to it and you’re good to go!
You can try it out yourself here.
Cheers!