Hacker News new | ask | show | jobs
by joshstrange 1833 days ago
I might have to try this again but I think I tried this at some point and I failed to get it working but it might have been making a mistake.
1 comments

Some potential things to watch for:

- try not to obtain and initialize the audio context until the triggering event has occurred

- make sure the audio context + playback occurs directly as a result of the triggering event. If the event just sets some state, and then something else is periodically watching for that state to change, it may fail. A workaround here is to just mute+play some sound on that first tap, then you're good for any later Audio contexts created+initiated however you'd like.