HTML The Definitive Guide (54 page)

Read HTML The Definitive Guide Online

Authors: Chuck Musciano Bill Kennedy

BOOK: HTML The Definitive Guide
12.07Mb size Format: txt, pdf, ePub

5.2.7 Video Extensions

The special controls, dynsrc, loop, and start attribute extensions for the tag are unique to Internet Explorer and are not HTML 4.0 standard attributes. They let you embed an inline movie into the body content, just like an image.

Equivalent behavior is available in Netscape via an extension program known as a plug-in. Plugins place an additional burden on the user, in that each user must find and install the appropriate plug-in before being able to view the inline video. The Internet Explorer tag extensions, on the other hand, make video display an intrinsic part of the browser.
[Embedded

Content, 13.2]

However, the Internet Explorer movie extensions currently are very limited. They are not supported by any other browser and can be used only with Audio Video Interleave (AVI) formatted movie files, since that's the player format built into Internet Explorer and enabled through Microsoft's Windows operating system software. Moreover, recent innovations in browser technology, objects, and applets in particular, may make Internet Explorer's approach of extending the already overloaded tag obsolete.

5.2.7.1 The dynsrc attribute

Use the dynsrc attribute extension in the tag to reference an AVI movie for inline display by Internet Explorer. Its required value is the URL of the movie file enclosed in quotation marks. For example, this text displays the tag and attribute for an AVI movie file entitled
intro.avi
: The browser sets aside a video viewport in the HTML display window and plays the movie, with audio if it's included in the clip and if your computer is able to play audio. Internet Explorer treats dynsrc movies similar to inline images: in line with current body content and according to the dimension of the video frame. And, like common images, the dynsrc referenced movie file gets displayed immediately after download from the server. You may change those defaults and add some user controls with other attributes, as described later.

Because all other browsers currently ignore the special Internet Explorer attributes for movies, they may become confused by an tag that does not contain the otherwise required src attribute and an image URL. We recommend that you include the src attribute and a valid image file URL in all tags, including those that reference a movie for Internet Explorer users. The other browsers display the still image in place of the movie; Internet Explorer does the reverse and plays the movie, but does not display the image. Note that the order of attributes does not matter. For example: Internet Explorer loads and plays the AVI movie
intro.avi
; other graphical browsers will load and display the
mvstill.gif
image instead.

5.2.7.2 The controls attribute

Normally, Internet Explorer plays a movie inside a framed viewport once, without any visible user controls. The user may restart, stop, and continue the movie by clicking inside that viewport with the mouse. Use the controls attribute (no value) to add visible controls to the movie viewport so that the user may, with the mouse, play, fast-forward, reverse, stop, and pause the movie, like on a VCR. If the movie clip includes a sound track, Internet Explorer provides an audio volume control as well.

For example:

adds the various playback controls to the video window of the
intro.avi
movie clip, as shown in Figure 5.19.

Figure 5.19: The controls attribute adds movie playback controls to the video playback frame

5.2.7.3 The loop attribute

Internet Explorer normally plays a movie clip from beginning to end once after download. The loop attribute for the movie tag lets you have the clip play repeatedly for an integer number of times set by the attribute's value, or forever if the value is infinite. The user may still cut the loop short by clicking on the movie image, by pressing the stop button, if given controls (see section 5.2.7.2), or by moving on to another document.

Other books

A Wedding in Provence by Sussman, Ellen
A Good Man in Africa by William Boyd
Into The Darkness by Kelly, Doug
When in Rio by Delphine Dryden
Pearls by Mills, Lisa
Human Sister by Bainbridge, Jim
Rital of Proof by Dara Joy
Destined for Doon by Carey Corp
Cause for Alarm by Eric Ambler