Embedding video files without JavaScript

Nowadays, it is more or less the norm to use JavaScript to insert video content embedded in Flash into web pages. While it does work in the majority of cases, there are a couple of problems: it requires JavaScript and it requires Flash.

Some people block JavaScript, some block Flash, some block both, and some use platforms or user agents that do not support JavaScript and/or Flash. Like the iPhone and iPod Touch, for example. So to reach the largest possible number of people with your videos, you may want to look into the method described by Kroc Camen in Video for Everybody!.

The method uses a combination of the object element and the HTML 5 video element to embed video files. Browsers that support video use that. If the browser does not support video, QuickTime is used if it is installed. If it isn’t, Flash is used. If there is no support for video, QuickTime or Flash, a placeholder image is displayed.

I find it a bit annoying that JavaScript and Flash are required to see videos on most sites, so this looks quite interesting. The drawback is that if you use this method, you’ll be using features from a spec that has not yet reached Last Call status. The choice is yours.

Further reading about the video element:

Posted on January 25, 2010 in (X)HTML, HTML 5