HTML and CSS Reference
In-Depth Information
WebM Audio
WebM is a container based on the profile for the Matroska Multimedia Container. WebM was
designed from the beginning to be patent and royalty free. Google was instrumental in form-
ing the organization behind WebM, but has given up any and all patent claims to the container.
Codec support in WebM is quite simple: WebM only supports Vorbis for audio, and VP8 for
video (which I'll cover in the next section). The reasons for such simple codec support are
given in a FAQ at the WebM web site:
she can be confident that it will play in any browser or media player that supports WebM.
WebM is supported by Chrome, Firefox, and Opera. It is not currently supported by IE and
Safari. However, people can ensure that WebM files work in their IE9 browser by installing
the WebM plug-in for IE9 (found at ). However, since
we as page authors, designers, and developers can't be sure that the WebM plug-in is installed,
we have to provide support for browsers that currently don't support WebM.
People typically think that WebM is solely a video file format. However, you can create a WebM
file that consists of only one Vorbis data stream, and it works in an audio element. The source
element's type setting is audio/webm . Find out more about WebM at the project website, at ht-
tp:// .
I've covered the popular audio and video file types, but how do browsers know if an MP4 is
an audio file, or a video file? Of if this file is an Ogg, and that is a WebM? Well, they can
open the file and see for themselves. Or we can provide the information directly in the media
Providing Codec information in the type attribute
Earlier, I stated that an MP4 file can be audio or video. So how does the browser or other ap-
plication know which type of file it is? Or what codec is being used in the MP4 container? In
fact, what codec is used in any of the containers?
One approach is to use a popular and unique file extension, such as.m4a, and then add a
MIME type to your web server for the extension. You can add the MIME type directly to the
Search WWH ::

Custom Search