The currentPlaylist property specifies or retrieves the current Playlist object.
This property is a read/write Playlist object.
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.
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);
||Windows Media Player version 7.0 or later.