Delen via


MediaPlaybackSession.NaturalDurationChanged Event

Definition

Occurs when the duration of the currently playing media item changes.

// Register
event_token NaturalDurationChanged(TypedEventHandler<MediaPlaybackSession, IInspectable const&> const& handler) const;

// Revoke with event_token
void NaturalDurationChanged(event_token const* cookie) const;

// Revoke with event_revoker
MediaPlaybackSession::NaturalDurationChanged_revoker NaturalDurationChanged(auto_revoke_t, TypedEventHandler<MediaPlaybackSession, IInspectable const&> const& handler) const;
public event TypedEventHandler<MediaPlaybackSession,object> NaturalDurationChanged;
function onNaturalDurationChanged(eventArgs) { /* Your code */ }
mediaPlaybackSession.addEventListener("naturaldurationchanged", onNaturalDurationChanged);
mediaPlaybackSession.removeEventListener("naturaldurationchanged", onNaturalDurationChanged);
- or -
mediaPlaybackSession.onnaturaldurationchanged = onNaturalDurationChanged;
Public Custom Event NaturalDurationChanged As TypedEventHandler(Of MediaPlaybackSession, Object) 

Event Type

Applies to