Player.newPlaylist method

The newPlaylist method creates a new Playlist object.

Syntax


retVal = Player.newPlaylist(
  name,
  URL
)

Parameters

name [in]

String containing the name of the new playlist.

URL [in]

String containing the URL of the Windows Media metafile playlist to create the Playlist object with.

Return value

This method returns a Playlist object.

Remarks

If the URL parameter is set to null or "" (empty string), an empty Playlist object will be created. If the name parameter is set to "", the name in the metafile is used.

The new playlist created with this method is not added to the library. To add a new playlist to the library, use PlaylistCollection.importPlaylist or PlaylistCollection.newPlaylist. Any leading or trailing spaces in the playlist name are automatically removed when it is added to the library.

Because the library allows multiple playlists with the same name, you may want to check for the presence of a playlist with a given name before adding a new one.

Requirements

Version

Windows Media Player 9 Series or later.

DLL

Wmp.dll

See also

Player Object
PlaylistCollection.importPlaylist
PlaylistCollection.newPlaylist
Windows Media Metafiles

 

 

Show: