MediaPlayer.CurrentStateChanged MediaPlayer.CurrentStateChanged MediaPlayer.CurrentStateChanged MediaPlayer.CurrentStateChanged MediaPlayer.CurrentStateChanged Event

Definition

Occurs when the state of the media player has changed.

Note

MediaPlayer.CurrentStateChanged may be altered or unavailable after Windows 10, version 1607. Instead, use the MediaPlayer.PlaybackSession property to get a MediaPlaybackSession object and then use the MediaPlaybackSession.PlaybackStateChanged event.

public : event TypedEventHandler<MediaPlayer, object> CurrentStateChanged
// Register
event_token CurrentStateChanged(TypedEventHandler<MediaPlayer, object> const& handler) const;

// Revoke with event_token
void CurrentStateChanged(event_token const& cookie) const;

// Revoke with event_revoker
CurrentStateChanged_revoker CurrentStateChanged(auto_revoke_t, TypedEventHandler<MediaPlayer, object> const& handler) const;
public event TypedEventHandler<MediaPlayer, object> CurrentStateChanged
Public Event CurrentStateChanged As TypedEventHandler (Of MediaPlayer, object)
function onCurrentStateChanged(eventArgs){/* Your code */}


mediaPlayer.addEventListener("currentstatechanged", onCurrentStateChanged);
mediaPlayer.removeEventListener("currentstatechanged", onCurrentStateChanged);