Windows Media Player 11 SDK MediaCollection.getAttributeStringCollection 

Windows Media Player SDK banner art

Previous Next

MediaCollection.getAttributeStringCollection

The getAttributeStringCollection method retrieves a StringCollection object representing the set of all values for a specified attribute within a specified media type.

Syntax

  

Parameters

attribute

String specifying the attribute.

mediaType

String representing the media type. Contains one of the following values: "Audio", "Video", "Playlist", or "Other".

Return Values

This method returns a StringCollection object.

Remarks

To use this method, read access to the library is required. For more information, see Library Access.

For information about the attributes supported by Windows Media Player, see the Attribute Reference section.

Example Code

The following JScript example uses MediaCollection.getAttributeStringCollection to display a list of values that correspond to a particular attribute for audio items in the media collection. An HTML SELECT element, created with ID = "Attribute", allows the user to select an attribute, such as Artist, Genre, or Album. An HTML TEXTAREA element, created with ID = "AttributeVals", displays the result. The Player object was created with ID = "Player".

  

Requirements

Version: Windows Media Player version 7.0 or later.

Library: Use wmp.dll.

See Also

Previous Next