html5media: <video> Tag for Everyone!

html5media is a javascript utility that you can simply call in your page’s header and use the generic HTML5 <video> tag to display videos, without having to worry if your reader’s browser support HTML5 and the <video> tag.

Usage is very simple. Place this code in the <head> section:

<script src="http://html5media.googlecode.com/svn/trunk/src/html5media.min.js"></script>

After that, embedded movies can be added simply:

<video src="video.mp4" width="320" height="240" controls autobuffer></video>

When HTML5 video is supported by a given browser, the file is served as is. Otherwise, a simple flash movie player is dynamically swapped in its place. Note however that encoding issues are still present, especially the H.264/Theora debate that plagues Firefox and makes it different to other modern browsers.