Share via


Windows Media Player 11 SDK Media.isMemberOf 

Windows Media Player SDK banner art

Previous Next

Media.isMemberOf

The isMemberOf method returns a value indicating whether the media item is a member of the specified playlist.

Syntax

  

Parameters

playlist

Playlist object that might contain the media item.

Return Values

This method returns a Boolean.

Remarks

This method is cannot check playlists retrieved through the MediaCollection object. To test whether a media item is a member of a particular named playlist, retrieve the playlist with player.playlistCollection.getByName(name).item(0). This method can also be used with CD playlists and metafile playlists.

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

Example Code

The following JScript example uses Media.isMemberOf to test whether the current media item is a member of the playlist named Sample Playlist. If it is not, the current media item is appended to the sample playlist. 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