Saturday, May 7, 2011

Tip of the Day

I actually have never tested this, but I don't see any reason for it not to work.

You may start using HTML5 audio/video. I'll tell you why.

HTML5 audio/video allows you to insert text in between the start and end tags to show older browsers that they do not support the element. And the deprecated "embed" tag can actually become useful as a fallback.

Here's the coding:

<audio controls="controls">
<source src="yoursongtitle.ogg" type="audio/ogg">
<source src="yoursongtitle.mp3" type="audio/mp3">
<embed src="yoursongtitle.mp3"><embed>
</audio>

Try it out in an older browser that doesn't support any HTML5 or doesn't support the audio or video element. Use your own song for it. Try it out in as many browsers/versions as you can. Tell me how it turned out. Try it out with the "video" element, too. (When doing video, replace the extension "mp3" with "mp4".) Remember that certain browsers need certain plugins available for the "embed" element, but with the "audio" and "video" element, there's no worrying about it.

A good tip for media.

No comments:

Post a Comment

Please keep your comments appropriate.