Windows Media Player SDK banner art
PreviousNext

MediaCollection.getByAttribute

The getByAttribute method retrieves a playlist of media items with the specified attribute having the specified value.

Syntax

player.mediaCollection.getByAttribute(attribute, value)

Parameters

  attribute

String indicating the name of the attribute to search on. Contains one of the following values: Artist, Author, Genre, Album.

  value

String indicating the value that the attribute should have.

Return Values

This method returns a Playlist object.

Remarks

This method can be used to create a generic query for media items that match a value for an attribute in the database. This is especially useful in the case of user-defined attributes. If the attribute does not exist, an error will result.

See Also

PreviousNext


© 2000-2001 Microsoft Corporation. All rights reserved.