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 for everybody

According to author Mark Pilgrim, your HTML5 web video work flow will look something like this:

  • Make one version that uses WebM (VP8 and Vorbis).
  • Make another version that uses H.264 baseline video and AAC "low complexity" audio in an MP4 container.
  • Make another version that uses Theora video and Vorbis audio in an Ogg container.
  • Link to all three video files from a single <video> element, and fall back to a Flash-based video player.

Kroc Camen did exactly that when he created "Video for Everybody", a chunk of HTML code that displays the new HTML5 video element if the user's browser can handle it and a Flash movie if it can't — all without JavaScript. Let's look at how Kroc did it at http://camendesign.com/code/video_for_everybody ...

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