HTML5 Video How-to

HTML5 Video How-to

Alex Libby

Language: English

Pages: 60

ISBN: B0108EK33G

Format: PDF / Kindle (mobi) / ePub


Over 20 practical, hands-on recipes to encode and display videos in the HTML5 video standard
* Encode and embed videos into web pages using the HTML5 video standard
* Publish videos to popular sites, such as YouTube or VideoBin
* Provide cross-browser support for HTML5 videos and create your own custom video player using jQuery

In Detail

Publishing videos online has been around for a number of years, although has really taken off with the advent of video sharing sites such as YouTube. The power of video is huge if done well; it can present a lot of information in a more visually engaging manner than using written text and pictures. Done badly though – it can present real problems to the company or individual hosting the video, that have the potential to cause some real harm!

"HTML5 Video How-To" is a practical, hands-on guide that provides you with a number of clear step-by-step exercises, which will help you take advantage of the real power that is behind HTML5 video, and give you a good grounding in using it in your web pages.

This book looks at the HTML5 video formats available, and breaks down the mystery and confusion that surrounds which format to use. It will take you through a number of clear, practical recipes that will help you to take advantage of the new HTML5 video standard, quickly and painlessly.

You will also learn how to build your own video player using jQuery, or by using one of the pre-built libraries available. We will also take a look at adding functionality such as lightbox effects, or subtitles, as well as how to publish videos to popular hosting sites, such as YouTube or VideoBin. If you want to take advantage of using the new HTML5 video format, then this is the book for you.

You will learn everything you need to know to convert videos into the right format, as well as how to display them in your browser or web pages, across multiple platforms.

What will you learn from this book
* Converting videos into a valid HTML5 format
* Setting up playback support for videos from within your web pages or browser
* Embedding videos using the HTML5 standard
* Publishing videos to popular hosting sites, such as YouTube or VideoBin
* Setting up fall-back support for older browsers
* Support for cross-browser playback, using a HTML5 polyfill
* Building your own custom video player using jQuery
* Creating a theme for use with your video player
* Adding subtitles to your video
* Presenting videos using a "lightbox" effect

Approach

This book takes the How-to series approach to help you learn most important tasks through recipes

Who this book is written for

This book is great for developers new to the HTML5 Video standard, and who are looking to get a good grounding in how to use the new format. It's assumed that you will have some experience in HTML and jQuery already, as well as being familiar with embedding videos using current "old school" methods, such as Windows Media Player. Readers are expected to have one or more videos available, which will be used during the exercises within this book.

Learning HTML5 by Creating Fun Games

Beginning SQL Server for Developers (4th Edition)

OpenLayers 3: Beginner's Guide

The Smashing Book #2 (Digital Edition) (Smashing Books)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

we've added support to play back videos via the play/pause button, and through the right-click context menu. Although this results in a perfectly usable player, it is missing one important function. Most people expect to be able to simply click the video to play or pause it—this usually comes as part of an overlay that will slightly darken the picture, or show it at normal strength, depending on its current state. We're going to add this missing functionality to our video player as part of the

start to add in the requisite jQuery functionality, beginning with a click handler to allow us to fire off events that handle the playing and pausing of videos:$oOverlay.click(function() { $oVideo.click(); }); The Play event needs to be adjusted:// events section $oPlay.click(function () { $oVideo[0].play(); $oPlay.hide(); $oPause.css('display', 'block'); $oOverlay.fadeOut(); }); followed by the Pause method: $oPause.click(function () { $oVideo[0].pause(); $oPause.hide();

go ahead and add in the following code snippet:

We also need to add in the thumbnails that will add as jump links, immediately below the closing

tag:

as Apple Macs. Make sure you also have a copy of your raw video at hand, ready for conversion. For the purposes of this task, I will assume it is in the .mov format. How to do it... The first step is to install the software; so let's go ahead and run the easyhtml5video-setup.exe program, accepting all defaults. Double-click on it to open up EasyHTML5Video 1.3.4 Freeversion and click on Select new video, then drag and drop your video onto the screen that looks similar to the following

present, so let's correct that now: How it works... The reason for specifying a number of different sources is to allow the browser to pick the right video to play; not all formats are compatible with all browsers. You will see that we've also

Download sample

Download