/ Published in: HTML
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.
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.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<video width="320" height="240"> <source src="myvideo.mp4" type="video/mp4" /> <source src="myvideo.ogv" type="video/ogg" /> <source src="myvideo.webm" type="video/webm" /> <img src="videofail.png" /> </video>
URL: http://blogs.sitepoint.com/2010/11/05/html5-video-cross-browser-fall-backs/