Chrome only Loading 6 HTML5 audio tags

前端 未结 5 991
野趣味
野趣味 2021-01-01 23:10

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

相关标签:
5条回答
  • 2021-01-01 23:41

    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.

    0 讨论(0)
  • 2021-01-01 23:51

    I think this problem can be fixed by setting attribute preload of audio tag to metadata.

    0 讨论(0)
  • 2021-01-02 00:03

    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.

    0 讨论(0)
  • 2021-01-02 00:05

    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.

    0 讨论(0)
  • 2021-01-02 00:07

    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.

    0 讨论(0)
提交回复
热议问题