Compartir a través de


CurrentPlaylistItemAvailable Event of the AxWindowsMediaPlayer Object

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The CurrentPlaylistItemAvailable event occurs when the current playlist becomes available.

[C#]
private void player_CurrentPlaylistItemAvailable(
  object sender,
  _WMPOCXEvents_CurrentPlaylistItemAvailableEvent e
)

[Visual Basic]
Private Sub player_CurrentPlaylistItemAvailable(  
  sender As Object,
  e As _WMPOCXEvents_CurrentPlaylistItemAvailableEvent
) Handles player.CurrentPlaylistItemAvailable

Event Data

The handler associated with this event is of type AxWMPLib._WMPOCXEvents_CurrentPlaylistItemAvailableEventHandler. This handler receives an argument of type AxWMPLib._WMPOCXEvents_CurrentPlaylistItemAvailableEvent, which contains the following property related to this event.

Property Description
bstrItemName System.StringThe name of the current playlist item.

Remarks

The name of the current playlist can be used to retrieve the corresponding IWMPPlaylist interface from the IWMPPlaylistArray interface that is returned from the IWMPPlaylistCollection.getByName method.

Requirements

Requirement Value
Version
Windows Media Player 9 Series or later
Namespace
AxWMPLib
Assembly
AxInterop.WMPLib.dll (AxInterop.WMPLib.dll.dll)

See also

AxWindowsMediaPlayer Object (VB and C#)

IWMPPlaylist Interface (VB and C#)

IWMPPlaylistArray Interface (VB and C#)

IWMPPlaylistCollection.getByName (VB and C#)