Controls.currentItem

The currentItem property specifies or retrieves the current media item.

player.controls.currentItem
      

Possible Values

This property is a read/write Media object.

Remarks

This method works only with items in Player.currentPlaylist. Calling currentItem with a reference to a saved media item is not supported.

Examples

The following JScript example uses currentItem to set the player control current media item to the selected value in an HTML SELECT element. The current playlist was first specified by using PlaylistCollection.getByName. The Player object was created with ID = "Player".



<SELECT ID = playItem  NAME = "playItem"  LANGUAGE = "JScript"

    /* Specify the current item when the selected list value changes. */
    onChange = "Player.controls.currentItem = Player.currentPlaylist.item(playItem.value);">

    /* Fill the SELECT element list with three items that match
       the songs in the playlist. */
    <OPTION VALUE = 0 >Laure
    <OPTION VALUE = 1 >Jeanne
    <OPTION VALUE = 2 >House
</SELECT>



Requirements

Version

Windows Media Player version 7.0 or later.

DLL

Wmp.dll

See also

Controls Object
Media Object
PlaylistCollection.getByName

 

 

Show: