O'Reilly logo

HTML5 Multimedia Development Cookbook by Lee Jordan, Dale Cruse

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Displaying video dynamically using jQuery

The video element gives us the power to treat videos like images and manipulate them in fun and exciting ways.

Getting ready

You will need a video available in multiple file formats (which are provided in the chapter code for this book). A server to which to upload your files is recommended, as not all browsers play files locally in a predictable way.

How to do it...

First, we have to prepare an HTML5 page in which to place it. Type the opening tags for our page: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Video Explosion</title>.

Open up the stylesheet.css file from the downloaded code files or create a new file with the same name.

Type the following for the body style: body {background: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required