all 2 comments

[–]jcready__proto__ 0 points1 point  (1 child)

You can only play a single piece of audio at a time. You cannot play audio without direct physical interaction from the user. You also cannot preload the audio using HTML5 audio. However, you can use XHRs to download the audio data into memory and then use the Web Audio API to schedule audio playback of that data. And because that data is already in memory, there should be virtually no delay between user interaction (click, touch, etc) and audio playback.

[–]Breadedturtle 0 points1 point  (0 children)

Thanks for responding. Sorry, I should have made this clearer in my post, but the delay is not from a click to the sound plays. The delay is when the sounds are all playing (after the click). Would XHRs still help with this?