MediaCollection.getPlaylistByQuery method

The getPlaylistByQuery method retrieves a Playlist object containing Media objects that match the query conditions.

Syntax

retVal = MediaCollection.getPlaylistByQuery(
  query,
  mediaType,
  sortAttribute,
  sortAscending
)

Parameters

query [in]

Query object that defines the conditions used to create the playlist.

mediaType [in]

String containing the media type. Must contain one of the following values: "audio", "video", "photo", "playlist", or "other".

sortAttribute [in]

String containing the attribute name used for sorting. An empty string ("") means no sorting is applied.

sortAscending [in]

Boolean, true indicating that the playlist must be sorted in ascending order.

Return value

This method returns a Playlist object.

Remarks

Compound queries using Query are not case sensitive.

When the compound query specified by the query parameter contains a condition built on the MediaType attribute, that condition is ignored. The value for the mediaType parameter is always used. For example, if the compound query contains the condition "MediaType Equals audio" and the value for the mediaType parameter is "video", the resulting playlist will contain only video items.

Requirements

Version
Windows Media Player 11.
DLL
Wmp.dll

See also

MediaCollection Object

MediaType Attribute

Query Object