HTML and CSS Reference
In-Depth Information
C H A P T E R 5
Multimedia: Video, Audio, and
Embedded Media
Long gone are the days when websites were only lists of bulleted text, without any form
of imagery. But if you think about it, HTML has never been really multimedia-savvy.
Images appeared early on, and there were gimmicky elements like (the now defunct) bg-
sound , but the interactive experiences, the web applications, the video players—each
has been provided by some form of plug-in for the most part that extended the capabilities
of HTML. In this regard, enhanced multimedia capability in HTML5 is a very apparent
coming of age for HTML to the end user. For instance, the video and audio elements
offer a standardized way to handle video and audio media, respectively. That sounds like
a huge advancement in web media, and it is, but it's not all smooth sailing. Although the
elements are standardized as part of the HTML5 specification, the file formats used in
these media elements are not, which leads to some verbose solutions for providing altern-
ative content. But fear not, this by no means makes these implementations unusable, and
in this chapter you will see that a consistent best-practice approach toward handling fall-
back content is possible.
I'll begin this chapter by running through some of the media elements in HTML and
give you an overview of what has changed. This will cover topics such as images, image
maps, generic embedded objects (the old-school way of handling video), and the state of
frames. I'll then go into the new elements introduced into HTML for handling video and
audio. Lastly, I'll briefly touch upon the canvas element, which is for defining an area
where imagery can be dynamically rendered. Interacting with canvas will be covered
in more depth in Chapter 7 , but the foundations will be covered in this chapter.
Where it all began: img
Early in the evolution of HTML it became apparent that the platform needed to support
some form of mixed media embedded into a page—at the very least images. Work toward
Search WWH ::

Custom Search