Catering to fallback support
So far, we've produced HTML5-formatted video content and seen how to embed it in our pages. There may be occasions, though, when we are working on a device that doesn't support a certain type of video format.
While support for HTML5 video is improving all the time, we're still at a stage where not every platform supports the same formats. This leaves us with two choices. We can either try to incorporate a different format, or we can simply set the content to degrade gracefully. We've looked at providing different formats, so let's switch track and see how we can gracefully degrade our content using Modernizr as the basis for our test. The following steps will guide us through the process of content degrading:
Let's begin by adding the following code to a new file and save it as
modernizr.html
:<!DOCTYPE html> <html class="no-js"> <head> <meta charset="utf-8"/> <title> Demo: Detecting support with Modernizr</title> <meta...