We have a web application in which we upload video along with several audio tracks. They are loaded as <video> and <audio> elements. We want to play all the audio tracks and synchronized video, so we want to wait for all the tracks to load before starting playback.
The problem arises when we have too many audio tracks (more than five).
- Chrome will begin to download the video and begin to receive the first five audio tracks.
- After he received 2 MB of audio tracks, he will not try to load until audio tracks are played. Connections are not released.
- The remaining requests for the audio track are put in a pending state, because Chrome does not allow more than six simultaneous requests to a single server.
Thus, we are stuck in catch-22: in order for the rest of the tracks to be loaded, it is necessary to remove connections from the old tracks. But for this we must start playing tracks that we donβt want to do until all the tracks have been downloaded.
By moving files to different subdomains, we can get around the limit of 6 requests, but Chrome also has a global limit of 10 concurrent connections, which sometimes also hit.
Is there a way to get Chrome to release connections and launch a new one if necessary? Or at least download the whole file? We have preload="auto" on the audio elements, but this has no effect.
source share