Showing posts with label HTML5. Show all posts
Showing posts with label HTML5. Show all posts

Saturday, October 8, 2011

Avoid using the 'preload="none"'-value with the audio-tag in IE-9...

First of all: For those of you looking for some M$-bashing in this posting, I'm afraid that you're going to have to look elsewhere...!
That being written - let's move on...

As you probably know, in conjunction with HTML5's audio-tag there are three values, which you can chose from  regarding how an audio file should be loaded, when the page loads - this is done by using the the "preload"-attribute; the three values are:

auto : Which specifies that the browser should load the entire audio-file, when page loads
metadata: Which specifies that the browser should load only the audio-file's metadata, when page loads
none: Which specifies that the browser should not pre-load the audio-file, when page loads

Now for those of  you, who might be concerned with such things such as server-traffic, bandwidth etc.would (obviously) probably opt for using  the "none"-value in connection with the audio-tag's "preload"-attribute!

But...

Unfortunately - if the "none"-value is chosen, IE-9 (which otherwise is a browser that M$ has - for the first time? - gotten done right), will NOT render and - inititally - show their HTML5 audio-player on one's webpage!
The player's there, mind - but it isn't visible, and can only be activated (and subsequently made visible), if one right-clicks in the area, where the player should've been (visible)!

Not all that user-friendly, if you ask me; but maybe the explanation to this can be found in M$'s own documentation: http://msdn.microsoft.com/en-us/library/ff974759(v=vs.85).aspx

It can be read regarding the "none"-value that: "The document author does not expect the user to need the media resource, or the server wants to minimize unnecessary traffic."!

BINGO!
So, in other words: M$ believes that the "none"-value should be used IF one doesn't expect a user to need the audio-player (present in IE9, mind)!

So to sum things up: In short - don't use the audio-tag's "preload"-attribute's "none"-value, and you'll be safe, if you want your audio-player to also work in IE-9...!

Thanks for reading this...
d.