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

Embedding HTML5 video content

As with all projects, we need to start somewhere—we could simply double-click on a video and let it play in any application we have installed, that supports the format. However, this isn't what we're here to do; we want to view the content in a browser and set it to resize automatically!

The following steps will show you how to achieve this using videos I've converted from the open source Big Bunny Project at http://www.bigbuckbunny.org:

  1. Let's start by opening a copy of the template file we created earlier in the book, then alter the <title> tag of our demo, as shown in the following code snippet:
    <title>Demo: Controlling Video sizes using media queries</title>
  2. In the <body> tag of our code, go ahead and add the following lines; these reference the different video formats we can use, depending on which browser we're working with:
      <video controls>
        <source src="video/bigbuckbunny.mp4&quot...
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