Posted By

blueocto on 02/07/11


Tagged

flash video html5


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

ddubyah17
SpinZ


Cross-Browser HTML5 Video With Flash or Silverlight Fall-back


 / Published in: HTML
 

URL: http://blogs.sitepoint.com/2010/11/05/html5-video-cross-browser-fall-backs/

Until recently, playing video files in a web page was notoriously complicated. The user requires a Flash or Silverlight plug-in and even the simplest HTML is a confusing mess.

Few HTML5 features excite developers more than native audio and video. The and tags allow you to play media files in an HTML5-aware browser without a plug-in. The elements also become part of the DOM so you can create your own player controls, add captions and synchronize JavaScript events with media playback. As a bonus, the basic HTML5 code is far easier to understand.

  1. <video width="320" height="240">
  2. <source src="myvideo.mp4" type="video/mp4" />
  3. <source src="myvideo.ogv" type="video/ogg" />
  4. <source src="myvideo.webm" type="video/webm" />
  5. <p>Sorry, your browser cannot play this video.</p>
  6. <img src="videofail.png" />
  7. </video>

Report this snippet  

You need to login to post a comment.