Video Support html5

Video Support html5


<video controls preload>
 <source src="ogvfileformat.ogv" type="video/ogg; codecs='vorbis, theora'" />
 <source src="mp4fileformat.mp4" type="video/mp4; 'codecs='avc1.42E01E, mp4a.40.2'" />
 <p> Your browser is old. <a href="mp4fileformat.mp4">Download this video instead.</a> </p>
</video>


Much like the <audio> element, we also, of course, have HTML5 video as well in the new browsers! In fact, just recently, YouTube announced a new HTML5 video embed for their videos, for browsers which support it. Unfortunately, again, because the HTML5 spec doesn’t specify a specific codec for video, it’s left to the browsers to decide. While Safari, and Internet Explorer 9 can be expected to support video in the H.264 format (which Flash players can play), Firefox and Opera are sticking with the open source Theora and Vorbis formats. As such, when displaying HTML5 video, you must offer both formats.

Chrome can correctly display video that is encoded in both the “ogg” and “mp4″ formats.


There are a few things worth noting here.
  1. We aren’t technically required to set the type attribute; however, if we don’t, the browser has to figure out the type itself. Save some bandwidth, and declare it yourself.
  2. Not all browsers understand HTML5 video. Below the source elements, we can either offer a download link, or embed a Flash version of the video instead. It’s up to you.
  3. The controls and preload attributes will be discussed;

For MVC Video Nuget Package Download

Now you can download ASP.NET HTML5 Control Free

Video Support html5 Video Support html5 Reviewed by Bhaumik Patel on 6:29 AM Rating: 5