MediaPlaybackSession.NaturalDurationChanged 事件

定义

在当前播放的媒体项的持续时间更改时发生。

// 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) 

事件类型

适用于