Partager via


PARAM Elements in an OBJECT Element

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

Windows Media Player uses the PARAM element to define specific startup conditions for the control. The PARAM element is embedded inside the OBJECT element.

For example, if you want to define whether the autoStart property is True, you would embed the PARAM element inside the OBJECT element.

<OBJECT ID="Player"
  CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
    <PARAM name="autoStart" value="True">
</OBJECT>

You can have as many PARAM elements in an OBJECT element as you want. PARAM has two attributes, name and value. Both attributes must be set.

The supported PARAM attributes vary slightly among browsers and mime types. The following table shows the attributes supported by the Internet Explorer and Firefox browsers. The preferred mime type for the Firefox browser is application/x-ms-wmp, however, there are several other mime types that you can use to embed the Player control in a webpage hosted by the Firefox browser. The fourth column of the table shows the attributes that are supported when you use a mime type other than application/x-ms-wmp.

PARAM name Internet Explorer Firefox with mime type application/x-ms-wmp Firefox with any other mime type
autoStart yes yes yes
balance yes yes yes
baseURL yes yes yes
captioningID yes yes yes
currentMarker yes yes yes
currentPosition yes yes yes
defaultFrame yes no no
enableContextMenu yes yes yes
enabled yes yes yes
enableErrorDialogs yes yes no
fileName no yes yes
fullScreen yes no no
invokeURLs yes no no
mute yes yes yes
playCount yes yes no
rate yes yes yes
SAMIFileName yes yes yes
SAMILang yes yes yes
SAMIStyle yes yes yes
SRC no yes yes
stretchToFit yes yes no
URL yes yes yes
volume yes yes yes
windowlessVideo yes yes yes

 

Note

The fileName and SRC PARAM elements are supported by the Firefox plug-in, but not by Internet Explorer. They both perform the same function as the URL PARAM element.

 

See the Object Model Reference for Scripting for more details about the values for each name attribute.

Using the Windows Media Player Control in a Web Page