HTML5 Video Example



In simplest form, one can use the <video> element to include video in a web page. Just like <audio>, the problem lies with encoding. not all codecs are supporrted. MP4 is the default, but not every browser manufacturer chooses to pay the license to handle mp4 files. Open source Theora Ogg is an alternative. Of course, one must have a converter to make the appropriate conversions. As with the <audio> element, we must rely on some sort of graceful degradation (just like coding unobtrusive JavaScript).

View the source code of this page to better understand how video is included. Note that I code for controls so the video does not start playing immediately. I can also code for a poster (jpeg image) to serve as a placeholder (if desired) using the poster attribute on the <video> element.

Try this page in multiple browsers. I am not using a streaming server so the file may take a while to download. Works fine in Safari. Not so good in most others (yet). The file will begin playing automatically once it is downloaded.

Example video file

Welcome to the DuBois' back yard on the 4th of July. We like to celebrate our freedom by blowing things up. A lot of things...