Skip to content

Instantly share code, notes, and snippets.

@apphp-snippets
Created February 11, 2013 08:42
Show Gist options
  • Save apphp-snippets/4753296 to your computer and use it in GitHub Desktop.
Save apphp-snippets/4753296 to your computer and use it in GitHub Desktop.
This example is a basic design structure for loading multiple video and audio formats for universal work of media content on your page.
<!-- source: http://www.apphp.com/index.php?snippet=html-5-media-code -->
<video poster="images/preview.png" width="800" height="600" controls="controls" preload="none">
<source src="media/my_video.mp4" type="video/mp4"></source>
<source src="media/my_video.webm" type="video/webm"></source>
<source src="media/my_video.ogg" type="video/ogg"></source>
</video>
<audio controls="controls" preload="none">
<source src="audio/my_music.ogg" type="audio/ogg">
<source src="audio/my_music.mp3" type="audio/mpeg">
</audio>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment