Windows Media Services Banner Art

Embedding Windows Media Player ActiveX control

You can embed the Microsoft Windows Media Player ActiveX control in a Web page or other application container that supports ActiveX so that Windows Media Player is not started as a separate application. Instead, the content stream you specify in the control properties is played in the browser frame after the page is rendered. This allows you more control over how the user receives the streamed content and is also an easy way of providing Windows Media Player to users who do not have it installed on their computers.

When a user accesses a page in which the control is embedded, a certificate identifying the publisher of the control appears. The certificate prompts the user either to agree to have the control downloaded or to continue rendering the page without downloading the control. Content is not delivered if the control is not installed.

You can set the properties of the control through the HTML <OBJECT> tag, to define which .asf file, publishing point, or station to open, as well as how to play it. You also can use Microsoft Visual Basic scripting to define the properties of the control, such as which buttons are displayed. The following HTML <OBJECT> tag shows the control�s Class ID of Windows Media Player and some of its properties.

<OBJECT CLASSID="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95F"
HEIGHT=240 
WIDTH=320
NAME=Msshow1
ID=Msshow1
>
<PARAM NAME="FileName" VALUE="mms://MSserver/Msshow1.asf">
</OBJECT>

To learn more about the Windows Media Player control and its properties, see the Microsoft Windows Media Player Control SDK at the Microsoft Web site.

How you set the properties determines how Windows Media Player works. The FileName parameter identifies the .asf file that is played. You set the value for this parameter to be a URL as if you were going to play the .asf file from the Open option on the Windows Media Player File menu.


© 1996-1999 Microsoft Corporation. All rights reserved.