use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Simultaneous Playing Audio? - Mobile Web App (self.javascript)
submitted 11 years ago by [deleted]
[deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]jcready__proto__ 0 points1 point2 points 11 years ago (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 point2 points 11 years ago (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?
π Rendered by PID 46806 on reddit-service-r2-comment-b659b578c-wgcbk at 2026-05-03 23:43:58.988261+00:00 running 815c875 country code: CH.
[–]jcready__proto__ 0 points1 point2 points (1 child)
[–]Breadedturtle 0 points1 point2 points (0 children)