Embedding Windows Media

Windows Media movies may also be embedded on a web page. The minimal markup for embedding Windows Media is quite simple, but it can get complicated quickly when taking advantage of scripting features, custom buttons, and so on. This section covers just the basics.

Embedded movies are played in Internet Explorer (Windows) using an ActiveX control and in other browsers using the Windows Media Player plug-in. Recently released Gecko-based browsers (Netscape Navigator 7.1 and Firefox 1.0) also now support the ActiveX control. The basic markup for embedding Windows Media is shown here.

    <object id="Player" height="280" width="320"
          classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6">
       <param name="URL" value="movies/europe.wmv" />
       <param name="autoStart" value="false" />
       <param name="UIMode" value="full" />
    </object>

The classid attribute in the object element specifies the ActiveX control by its identifying number. The value beginning with clsid:6BF... is used with Windows Media Player Version 9 and 7. It is incompatible with earlier versions that use a different clsid.

This example uses these three common parameters:

URL (value=" url ")

Specifies the location of the movie file. This parameter replaces “Filename” used in earlier versions.

autoStart (value="true|false")

Specifies whether the movie begins playing automatically. The default is true.

UIMode (value="invisible|none|mini|full|custom")

Specifies whether (or which version) of the controls are displayed. The ...

Get Web Design in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.