|By Shamus||Mar 22, 2013||100 comments|
Three people so far have messaged me complaining that the diecast podcasts are “set to autoplay” when you visit the site. Like, you show up at the blog and the podcast just starts rolling for no reason.
Obviously this isn’t happening for everyone, or else the comments would be a ragestorm of indignation. Auto-play audio is so 1997 web design. However, it’s clearly happening to SOME people. And given that most people just hit the back button when they hit autoplay media, the actual number of affected people could be be a lot higher than it seems from these three messages.
So let’s see if we can figure this out. I’ve loaded up the site on Firefox and Chrome and it works fine. However, on IE 64 bit, the idiot browser does indeed load up the page and play every damn embedded file on the site like the giant heap of poorly engineered code it is. For the record, here is the embed code I’m using:
<audio controls height='50' width='300'>
<source src='/diecast/diecast5.mp3' type='audio/mpeg'>
<source src='/diecast/diecast5.ogg' type='audio/ogg'>
<embed height='50' width='300' src='/diecast/diecast5.mp3'>
Nothing in there should be causing auto-play. Of course, IE is doing some crazy stupid stuff where it pulls in Media Player and embeds THAT instead of using a more lightweight built-in player.
It’s very hard for me to not go into a eye-bulging red-faced white-knuckled tirade about now. There are so many things wrong that just explaining all the layers of failure would delay our search for a solution. Speaking of solutions:
- We need a solution. IE is in the minority among my users, but it’s not some obscure browser, either. And auto-play is basically a massive no-no, right up there with popup ads and “Download now” buttons that take you to other pages with “Download Now” buttons.
- Sneering at people to “use a REAL browser” – while perhaps therapeutic – is not a solution.
- Sneering “get rid of the embedded player” is also not a solution in the same way that walking is not a solution to a flat tire. We are engineers, not savages.
- We’ve got three parts to the embed code above: One is the Mp3 embed. The other is the ogg embed, which is for certain flavors or configurations of Linux that can play ogg and not MP3. Then inside of those tags is another legacy HTML tag for older browsers. This solution is taken directly from W3 Schools, which until now has ALWAYS been on top of stuff like this and aware of variations in browser behavior.
- The W3 Schools suggests using the FREE Yahoo! player. I suggest that the Yahoo Player can GO SCREW ITSELF.
I refuse to tangle with plugins when we’ve got perfectly good HTML that should do the job for us. Moreover, I have my doubts that the FREE Yahoo! player is cross platform. And I’ll bet it’s not actually FREE. It’s most likely some pestering little sleazeball of an app. Yahoo has been clingy and annoying in the past, and this is what you get when you act like a sleaze: Your brand name is tainted in a way that haunts you for years. I’m not even going to bother checking to see how the app works, because a lot of other people feel the same way about Yahoo and won’t want to install it, even if it’s fine.
(Note that all of this also applies to YOU, Adobe and Oracle. Acrobat and Java runtime have spent a lot of time standing on the streetcorner looking pasty and malnourished, asking passers-by if they want to “party”. I now regard the Adobe and Oracle logos the same way I viewed Realpalyer back in the day.)
But I digress…
- I can’t find any HTML tags to enable OR disable auto-play, using any embed code, for any browser.
The most frustrating thing here is that this does not need to be this hard. You’re talling me I can upload and embed gigabytes of video from YouTube easier than I can embed a simple audio file? In 2013?
So yeah. I’m still looking into this. If the MP3 is auto-playing for you and you’re NOT using Internet Explorer, PLEASE let me know, since right now I’m going on the assumption that this is an IE issue. In the meantime, if anyone has any suggestions (even how to break the embed code for IE only) please leave them in the comments.