Windows Media Player SDK banner art
PreviousNext

MediaCollection Object

The MediaCollection object provides a way to organize a large collection of media items. It can be queried to generate playlists automatically.

The MediaCollection object supports the following methods.

Method Description
add Adds a new media item to the media library.
getAll Retrieves a Playlist object containing all media items in the media library.
getAttributeStringCollection Retrieves a StringCollection object representing the set of all values for a given attribute within a given media type.
getByAlbum Retrieves a Playlist object containing media items from the specified album.
getByAttribute Retrieves a Playlist object containing media items with the specified attribute having the specified value.
getByAuthor Retrieves a Playlist object containing media items by the specified author.
getByGenre Retrieves a Playlist object containing media items with the specified genre.
getByName Retrieves a Playlist object containing media items with the specified name.
getMediaAtom Retrieves the index at which a given property resides within the set of available properties.
isDeleted Retrieves a value indicating whether the specified media item is in the deleted items folder.
remove Removes an item from the media collection.
setDeleted Moves the specified media item to the deleted items folder.

The MediaCollection object is accessed through the following property.

Object Property
Player mediaCollection

PreviousNext


© 2000-2001 Microsoft Corporation. All rights reserved.