AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Html5 audio player style example1/30/2024 Var audioTag = document.createElement('audio') I ended up using some code from my friend Matt Coneybeare. This applies to both audio and video tags. Instead you have to make an audio tag dynamically, then interrogate the tag. Getting HTML5 audio to fall back correctly in all browsers I have to use JavaScript, which is a bummer for such a fundamental scenario. This lack of an intuitive fallback means that I can't make an audio player that works everywhere using just HTML. As far as I can see, the only option in this situation is to rely on Javascript and the video element's canPlayType() function. I expected (incorrectly, in this case) that if I only produced one source element (an MP4), Firefox would drop down to use the fallback content, as it does if I include an object element for a format not supported (for example, if I include a QuickTime object and QT is not installed, the user sees fallback content). From Oct 2009, more people saying that it's not intuitive to fall back in this way: I talked to Chris Double via Christian Heilmann at Mozilla and he said "You'd need to raise the issue with WHATWG/W3C. What I want is "Can you support any of these audio sources? No? Fallback." This seems intuitive to me. It doesn't do what I would expect at all. That's because fallback elements are only used if your browser doesn't support the audio tag at all. Notice that while I have fallback text present, I don't see it in Firefox. The part I was disappointed in was more of an HTML5 specification issue. In Firefox 20 (the beta channel) on Windows 7 and above, you can test MP3 Audio support by turning on the preference in about:config. Firefox will support MP3s in audio soon though by using the underlying operating system to play the stream rather than its own embedded code. Ya, Firefox currently doesn't support MP3 audio so it just flashes once then disappears. Your browser doesn't support the HTML audio tag. The HTML5 Audio tag is wonderful, right? Just works. I also wanted a nicer in-browser audio experience so I assumed I'd just drop in the audio tag and be done, right? I am in the process of adding faces for ALL 360+ shows going back 6 years.Ī big thanks to Lynsey Smith from Portland Girl Geek Dinners, by the way, for her hard work in finding pics for me! I'd like to get the show expanded to a wider audience as I feel that listenership has kind of flattened lately. I hadn't realized how cheesy looking the podcast site was all these years. I've been spending the evenings and weekends lately redesigning the blog and the Hanselminutes podcast site.
0 Comments
Read More
Leave a Reply. |