MediaPlaybackSession.PlaybackStateChanged Event
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when the current playback state changes.
// Register
event_token PlaybackStateChanged(TypedEventHandler<MediaPlaybackSession, IInspectable const&> const& handler) const;
// Revoke with event_token
void PlaybackStateChanged(event_token const* cookie) const;
// Revoke with event_revoker
MediaPlaybackSession::PlaybackStateChanged_revoker PlaybackStateChanged(auto_revoke_t, TypedEventHandler<MediaPlaybackSession, IInspectable const&> const& handler) const;
C#
public event TypedEventHandler<MediaPlaybackSession,object> PlaybackStateChanged;
function onPlaybackStateChanged(eventArgs) { /* Your code */ }
mediaPlaybackSession.addEventListener("playbackstatechanged", onPlaybackStateChanged);
mediaPlaybackSession.removeEventListener("playbackstatechanged", onPlaybackStateChanged);
- or -
mediaPlaybackSession.onplaybackstatechanged = onPlaybackStateChanged;
Public Custom Event PlaybackStateChanged As TypedEventHandler(Of MediaPlaybackSession, Object)
Product | Versions |
---|---|
WinRT | Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |