Windows Media Player SDK banner art
PreviousNext

Embedding the Windows Media Player Control

This topic applies to Windows Media Player version 6.4 only.

The HTML OBJECT tag is used to embed ActiveX objects into an HTML file. The following code shows how to use the OBJECT tag to insert the Windows Media Player control.

<OBJECT ID="MediaPlayer1" WIDTH=320 HEIGHT=240
  CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95"
  STANDBY="Loading Windows Media Player components..."
  TYPE="application/x-oleobject">
</OBJECT>

The following OBJECT tag attributes are required.

Using the CODEBASE attribute is strongly recommended, but optional. It contains a Uniform Resource Locator (URL) pointing to a location where the Windows Media Player control can be downloaded from, if it is unavailable on a user's system. In addition to the address of the Windows Media Player object, the CODEBASE attribute can optionally specify a version number of the Windows Media Player control.

The Windows Media Player control is available for download on the Microsoft.com Web site, packaged as a .cab (cabinet) file.

PreviousNext


© 2000-2001 Microsoft Corporation. All rights reserved.