[Pro] audio elements won't play in Chrome

I figured out what the problem was, and I’m posting a follow-up in case it’s helpful to anyone else.

The short answer is that it is, as I had guessed in my original post, a known issue with Chrome: Chrome will choke if it tries to load more than six or so audio files on a page. It holds the metadata in a queue and doesn’t allow playback, even after refreshing. This explains why I was able to build a new test page and add one or two audio files, and have them play, but not be able to play anything on my existing page where there are over a dozen files.

The workaround is to set the “preload” setting for the audio element to “none”. This way, Chrome doesn’t “see” the audio until you click a play button, after which it loads and plays normally (albeit with a slight pause as the data loads – but that’s a small price to pay for solving the problem).

After identifying the issue by adding files one at a time and seeing that the page broke after a point, I googled that behavior specifically and found this:

There are certainly more elegant ways to present a large number of audio clips than I’ve arrived at here with this simple, straightforward page (I’m looking into jplayer) but this solves the problem for now.

Thanks again to Walter for offering assistance.


freewaytalk mailing list
email@hidden
Update your subscriptions at: