Posted By

apphp-snippets on 03/11/13


Tagged

html code media


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

faugustin
Abiotic


Media Code in HTML5


 / Published in: HTML
 

URL: http://www.apphp.com/index.php?snippet=html-5-media-code

This example is a basic design structure for loading multiple video and audio formats for universal work of media content on your page.

  1. <video poster="images/preview.png" width="800" height="600" controls="controls" preload="none">
  2. <source src="media/my_video.mp4" type="video/mp4"></source>
  3. <source src="media/my_video.webm" type="video/webm"></source>
  4. <source src="media/my_video.ogg" type="video/ogg"></source>
  5. </video>
  6. <audio controls="controls" preload="none">
  7. <source src="audio/my_music.ogg" type="audio/ogg">
  8. <source src="audio/my_music.mp3" type="audio/mpeg">
  9. </audio>

Report this snippet  

You need to login to post a comment.