<video src="ECHO Conference" />
<audio src="Parades" />

The Problem

The Solution: MediaElement.js

You use the <video> tag with one H.264 file (you can also include Ogg or WebM, but you don't need to). If the browser doesn't support it, then MediaElement.js replaces <video> with either Silverlight or Flash and returns a wrapper object that matches the HTML5 Media Element API. This lets you code to MediaElement.js as if it were a native <video>.

Better Still: MediaElementPlayer.js

MediaElementPlayer.js uses MediaElement.js and jQuery to build the complete working player you see here. The same HTML/CSS controls show up for everyone on any browser with any media type (use a single H.264 or include WebM, Ogg, WMV, FLV). It even works on iPhones, iPads, and Androids.

Browser support (using H.264)

Chrome Safari Internet Explorer Firefox Opera
iPad iPhone Android

The Code

<script src="jquery.js"></script>
<script src="mediaelement.js"></script>
<script src="mediaelementplayer.js"></script>
<link href="mediaelementplayer.css" rel="Stylesheet" />

<!-- Preferred: Use one H.264 file for everyone (with silverlight fallback) -->
<video src="myfile.mp4" type="video/mp4" width="640" height="360"></video>

<!-- OR use multiple codecs, your choice -->
<video width="640" height="360">
	<source src="myfile.mp4" type="video/mp4" >
	<source src="myfile.ogg" type="video/ogg" >
	<source src="myfile.webm" type="video/webm" >
</video>

<script>
jQuery(document).ready(function($) {
	$('video').mediaelementplayer();
});
</script>
			
 

More info

Download the Goods

Browse Github project Download MediaElement.js

MediaElement.js is GLPv2/MIT licensed. Use it everywhere and be good.