We are working on project at wavestack.com and we are dealing with an issue that its giving us a hard time.
Our page is supposed to load many audio tags at the same
By default, Chrome lets you download five or six files simultaneously because that is the default value in most Windows installations. If you need to download more than five files, Chrome places some of the target files in a queue and then downloads them as soon as one of the five slots becomes available. Chrome does not allow you to change the number of concurrent downloads within the application itself. However, by editing the Windows Registry, you can set the number of simultaneous downloads in Chrome, or any other Web browser, to any number you choose.
Read More @ ehow.com
Solution: One trick you can use to increase the number of concurrent conncetions is to host your video files from a different sub domain. These will be treated as seperate requests, each domain is what will be limited to the concurrent maximum.
I think this problem can be fixed by setting attribute preload of audio tag to metadata.
Easiest way to load all audio tags on your HTML page, use async
.
<audio async preload src="hit1.mp3"></audio>
I am working on a web application (game) so this is a perfectly reasonable solution for me.
Set the preload attribute of audio (and video) tags like this: <audio controls preload="none">
This way media files won't download on page load (think about mobile performance especially). When a user presses play the relevant file will download as normal.
For future reference:
It's bad practice to load them all at the same time because people with slow Internet speeds won't be able to use your website at all. All the downloads will make each download very slow.
It's better to create an audio element dynamically with Javascript.