Share via


Player6.GetMediaParameter (deprecated)

Windows Media Player SDK banner art

This page documents a feature of the Windows Media Player 6.4 ActiveX control. We recommend that you migrate your content to use the Windows Media Player 9 Series ActiveX control. For more information about the Windows Media Player 9 Series ActiveX control, see the Windows Media Player 9 Series SDK.

This method retrieves the value of the specified parameter for an indexed Windows Media metafile entry.

Syntax

MediaPlayer.GetMediaParameter(lEntryNum, sName)

Parameters

*  lEntryNum*

Long value indicating the index number of an ENTRY element in the Windows Media metafile.

*  sName*

BSTR value indicating the NAME attribute of a PARAM element within the specified ENTRY element. This value is not case sensitive.

Return Value

Returns a String value representing the VALUE attribute of the specified PARAM element. This method returns a null value if lEntryNum is outside the range of the EntryCount property, or if no PARAM element within the specified ENTRY element has a NAME attribute equal to sName.

Remarks

The PARAM element allows you to place additional information into a Windows Media metafile, which the Windows Media Player control can then access through scripting. For example, you could insert the names of the producers of all the media files inside the Windows Media metafile and display them in HTML somewhere near the Windows Media Player window.

Use this method to determine the values of the PARAM elements within a Windows Media metafile ENTRY element. Call the GetMediaParameterName method to determine names associated with PARAM elements.

The first ENTRY element in a Windows Media metafile has a lEntryNum index number of 1. Index number 0 is reserved for child elements of the metafile tag, which applies to information valid for the entire show.

An example Windows Media metafile might look like the following.

<ASX VERSION="3.0">
  <TITLE>The Title of the Show<TITLE>
  <ENTRY>
    <REF HREF="YourMediaFilename.asf" />
    <TITLE>The Title of the Track</TITLE>
    <PARAM NAME="Producer" VALUE="Jane D.">
  </ENTRY>
</ASX>

To retrieve the producer information for the first entry, call the method as follows.

MediaPlayer.GetMediaParameter( 1, "Producer");

This method call would return the string "Jane D.".

Note   This scripting method is only available for Windows Media Player version 6.01 and later. The standard installation of Microsoft Internet Explorer 5 includes a compatible version of Windows Media Player.

Requirements

Version: Windows Media Player version 6.4.

Library: Use msdxm.ocx.

Platform: Windows 98 Second Edition or higher.

See Also