Share via


Windows Media Player 11 SDK Player.CurrentItemChange EventĀ 

Windows Media Player SDK banner art

Previous Next

Player.CurrentItemChange Event

The CurrentItemChange event occurs when *Controls.*currentItem changes.

Syntax

  
    ()

Example Code

The following JScript example demonstrates an event handler for the Player.currentItemChange event. The Player object was created with ID = "Player".

<!-- Create an HTML text box to display the media item name. -->
<INPUT TYPE="TEXT" NAME="MEDIA">

<!-- Create an event handler. -->
<SCRIPT LANGUAGE = "JScript"  FOR = Player EVENT = currentItemChange()>

   // Display the name of the new media item.
   MEDIA.value = Player.currentMedia.name;

</SCRIPT>

Requirements

Version: Windows Media Player version 7.0 or later.

Library: Use wmp.dll.

See Also

Previous Next