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

Crossbrowser video support with vid.ly and jQuery

Supporting most browsers requires encoding a video into multiple formats, then serving up the right one to a browser. In this recipe we will use an online video display library named vid.ly (http://www.vid.ly) to prepare and share a video on a page reliably across multiple browsers and make the background color change over time.

Getting ready

You will need a video to upload to http://www.vid.ly. Some browsers do not allow files to be served locally, so you may also want a location where you can upload your files and test pages.

How to do it...

Type <!DOCTYPE html> <html lang="en"> <head>, then begin adding style declarations by typing <style type="text/css"> h2{color:#303;}.

Style a div to contain ...

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