Expand Minimize

Player.currentPlaylist

The currentPlaylist property specifies or retrieves the current Playlist object.

Syntax

player .currentPlaylist

Possible Values

This property is a read/write Playlist object.

Remarks

If the Settings.autoStart property is true, playback begins automatically whenever you set currentPlaylist.

This property takes a Playlist object, which can be acquired in several ways, such as by calling PlaylistArray.item or PlaylistCollection.newPlaylist. To load a Playlist item using a file name, set the URL property or use Player.newPlaylist.

Examples

The following JScript example retrieves the first playlist in the library. It then uses currentPlaylist to make the retrieved playlist the current playlist, and then to display the name of the current playlist. The Player object was created with ID = "Player".



// Retrieve the first playlist from the library.
var firstPL = Player.playlistCollection.getAll().item(0);

// Make the retrieved playlist the current playlist.
Player.currentPlaylist = firstPL;

// Display the name of the current playlist.
document.write("Found first playlist. Name: " + Player.currentPlaylist.name);


Requirements

Version

Windows Media Player version 7.0 or later.

DLL

Wmp.dll

See also

Player Object
Player.newPlaylist
Playlist Object
PlaylistArray.item
PlaylistCollection.newPlaylist
Settings.autoStart

 

 

Community Additions

ADD
Show:
© 2014 Microsoft