Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Responsive Media in HTML5

You're reading from   Responsive Media in HTML5 Learn effective administration of responsive media within your website or CMS system using practical techniques

Arrow left icon
Product type Paperback
Published in Dec 2014
Publisher
ISBN-13 9781849696968
Length 128 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Alex Libby Alex Libby
Author Profile Icon Alex Libby
Alex Libby
Arrow right icon
View More author details
Toc

Table of Contents (7) Chapters Close

Preface 1. Working with Responsive Images FREE CHAPTER 2. Adding Responsive Video Content 3. Mixing Content 4. Testing Responsive Media 5. Using Frameworks Index

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:

  1. 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...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime