O'Reilly logo

Web Design in a Nutshell, 2nd Edition by Jennifer Niederst Robbins

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

Adding Video to an HTML Document

This section looks at the ways video files can be linked to or embedded within an HTML document.

A Simple Link

Like audio, downloadable video files (AVI, MPEG, and QuickTime) can be linked to HTML documents using the standard <a> tag:

<A HREF="video.mov">Check out the video (1.3MB)</A>

When the user clicks on the link, the browser looks at the file type (as defined in the filename suffix) and launches an external player application or uses a plug-in to play the movie right in the browser window. Which player it uses depends on how that user has the browser configured, so it is out of the control of the web page designer.

Streaming Video

As in audio, streaming media in the RealMedia (.rm) and streaming Windows Media (.asf ) formats are added to web pages via linked or embedded reference files (also called metafiles). The process, covered in detail at the end of Chapter 24, is exactly the same for video as for audio. See the audio chapter for more thorough coverage.

RealMedia

In brief, to link to a RealMedia movie, create a link to a RealMedia metafile (.ram) as shown in this example:

<A HREF="movie.ram">Link to the streaming movie</A>

The metafile is a small text-only file that contains only the URL for the RealMedia file (suffix .rm). When the user clicks the link, the browser accesses the metafile, which launches the player and passes it the URL of the actual media file:

pnm://domainname.com/song.rm

To embed a RealMedia movie on a web page, use the ...

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