Book Image

Responsive Media in HTML5

By : Alex Libby
Book Image

Responsive Media in HTML5

By: Alex Libby

Overview of this book

Table of Contents (12 chapters)
Responsive Media in HTML5
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Displaying full-size videos


So far, we've covered a lot of theory about creating responsive videos. Now it's time to have a little fun! If we look on the Internet, we will see plenty of examples where designers have created sites that display videos full-size in the background when viewing content.

There are plenty of examples online of how to achieve this. We're going to use the jQuery Cover plugin created by Swedish developer Anton Trollbäck, which is available for download from https://github.com/antontrollback/cover. Let's make our video appear in its full size using the following steps:

  1. Firstly, from the code download that accompanies this book, extract a copy of fullsize.html. It contains some basic markup, which uses the HTML5 video tags to include two videos in MP4 and WebM format along with some text in an overlay.

  2. In fullsize.html, add the following lines immediately below the <title> statement:

        <link rel="stylesheet" href="css/fullsize.css">
        <script src="js...