HTML5 Audio not fully preloading in Chrome causing audio files to often fail to load completely
This Chrome support ticket points to a browser bug in the Chrome Browser itself to be the likely culprit.
Recent versions of Chrome exhibit the curious behavior of only preloading HTML5 <audio> files in 2MBish chunks, requesting the next chunk only when you are playing back the current chunk it has preloaded. This sounds like a smart optimization for network traffic, etc, but exacerbates and is likely related to the issue of stalling and failling-to-fully-load mp3s.
At its core the issue appears to be with network connections timing out and not being able to resume downloading chunks once they have timed out but curiously the audio often cuts out long before the preloaded marker is reached.
Here is a test player loading 8 mp3s
I am using MediaElement.js styled audio players here so you can see the preloaded percent of the bar in blue. With even the single player I was able to reproduce issues with playback permanently stalling, especially after leaving the files partially preloaded for 5-10 minutes.
Hopefully Chrome will push out a fix for this in their next 6 week silent browser update. In the meantime, I’ll dig around for a solution. An annoying possible fix that comes to mind is to not render your player until you are ready to autoplay it. Also using an audio library that you can force to fallback to Flash for Chrome is an option.
Pretty component to content. I simply stumbled
upon your site and in accession capital to assert that I get in fact enjoyed account your blog posts.
Anyway I will be subscribing to your augment or even
I success you get entry to consistently quickly.
Oh god I’m not alone! I’m searching a fix for this issue… Someone suggested to play the audio for 10 ms and pause again, but it is too short for chrome to understand… Latest versions of Firefox seem to have the same issue… what’s happening?! Did you get any news since that post?