HTML5 and CSS3, Second Edition

(singke) #1

  • The OGG container, with Theora video and Vorbis audio, which will work
    in Firefox, Chrome, and Opera.

  • The MP4 container, with H.264 video and AAC audio, which will work in
    Safari and Chrome, as well as Internet Explorer 9 and up. It will also play
    through Adobe Flash Player and on iPhones, iPods, and iPads.

  • The WebM container, using VP8 video and Vorbis audio, which will work
    in Firefox, Chrome, Opera, and Adobe Flash Player.


Given that Google andMozilla are moving ahead with VP8 and WebM, we’ll
eliminate Theora from the mix eventually, but we’re still looking at encoding
our videos at least twice—once using H.264 for Safari, iOS, and Internet
Explorer 9 and up, and then again in VP8 for Firefox and Opera, since both
of those browsers refuse to play H.264.^3

Browser Container Video Audio
Internet Explorer 9+ MP4 H.264 AAC or MP3
Safari and Safari on iOS MP4 H.264 AAC
Firefox, Chrome, Opera, and the Android WebM VP8 Vorbis
browser

That’s a lot to take in, but now that you’re familiar with the history and the
limitations, let’s dig into implementation, starting with audio.


  1. http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2009-June/020620.html


Chapter 7. Embedding Audio and Video • 136


Download from Wow! eBook <www.wowebook.com> report erratum • discuss

Free download pdf