# MediaElementPlayer.js

## 1. Single MP4 File

`

    <video width="640" height="360" src="../media/echo-hereweare.mp4" type="video/mp4"
    	id="player1" poster="../media/echo-hereweare.jpg"
    	controls="controls" preload="none"></video>

`

Note: if you are working with local files, you'll need to add your working directory to the Flash Global Security Settings.

## 2. Multi-Codec with no JavaScript fallback player

`

    <video width="640" height="360" id="player2" poster="../media/echo-hereweare.jpg" controls="controls" preload="none">
    	<!-- MP4 source must come first for iOS -->
    	<source type="video/mp4" src="../media/echo-hereweare.mp4" />
    	<!-- WebM for Firefox 4 and Opera -->
    	<source type="video/webm" src="../media/echo-hereweare.webm" />
    	<!-- OGG for Firefox 3 -->
    	<source type="video/ogg" src="../media/echo-hereweare.ogv" />
    	<!-- Fallback flash player for no-HTML5 browsers with JavaScript turned off -->
    	<object width="640" height="360" type="application/x-shockwave-flash" data="../build/flashmediaelement.swf">
    		<param name="movie" value="../build/flashmediaelement.swf" />
    		<param name="flashvars" value="controls=true&poster=../media/echo-hereweare.jpg&file=../media/echo-hereweare.mp4" />
    		<!-- Image fall back for non-HTML5 browser with JavaScript turned off and no Flash player installed -->
    		<img src="../media/echo-hereweare.jpg" width="640" height="360" alt="Here we are"
    			title="No video playback capabilities" />
    	</object>
    </video>

`