Skip to content

Instantly share code, notes, and snippets.

@daneden
Created February 6, 2012 19:53
Show Gist options
  • Save daneden/1754400 to your computer and use it in GitHub Desktop.
Save daneden/1754400 to your computer and use it in GitHub Desktop.
HTML5 Video with flash fallback
/* HTML5 Video with flash fallback */
<!-- "controls" enables native play, pause etc, "poster" is the image seen before play -->
<video controls width="360" height="240" poster="placeholder.jpg">
<!-- open source video for open source browsers -->
<source src="movie.ogv" type="video/ogg">
<!-- proprietary video for supported browsers (only the first supported video format will load though) -->
<source src="movie.mp4" type="video/mp4">
<!-- flash fallback -->
<object type="application/shockwave-flash" width="360" height="240" data="player.swf?file=movie.mp4">
<param name="movie" value="player.swf?file=movie.mp4">
<!-- and finally, a good old fashioned link for non-flash -->
<a href="movie.mp4">Download the movie</a>
</object>
</video>
{"view":"split","prefixfree":"1","page":"html"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment