共用方式為


MediaPlayer.PlaybackMediaMarkerReached 事件

定義

在播放期間到達媒體標記時發生。

注意

MediaPlayer.PlaybackMediaMarkerReached可能會在Windows 10 1607 版之後變更或無法使用。 請改用 MediaPlaybackItem.TimedMetadataTracks 來管理資料或文字提示。如需詳細資訊,請參閱 使用 MediaSource 播放媒體

// Register
event_token PlaybackMediaMarkerReached(TypedEventHandler<MediaPlayer, PlaybackMediaMarkerReachedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
MediaPlayer::PlaybackMediaMarkerReached_revoker PlaybackMediaMarkerReached(auto_revoke_t, TypedEventHandler<MediaPlayer, PlaybackMediaMarkerReachedEventArgs const&> const& handler) const;
/// [add: Windows.Foundation.Metadata.Deprecated("Use media tracks on MediaPlaybackItem instead of PlaybackMediaMarkers.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.Foundation.UniversalApiContract")]
/// [remove: Windows.Foundation.Metadata.Deprecated("Use media tracks on MediaPlaybackItem instead of PlaybackMediaMarkers.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.Foundation.UniversalApiContract")]
// Register
event_token PlaybackMediaMarkerReached(TypedEventHandler<MediaPlayer, PlaybackMediaMarkerReachedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
MediaPlayer::PlaybackMediaMarkerReached_revoker PlaybackMediaMarkerReached(auto_revoke_t, TypedEventHandler<MediaPlayer, PlaybackMediaMarkerReachedEventArgs const&> const& handler) const;
public event TypedEventHandler<MediaPlayer,PlaybackMediaMarkerReachedEventArgs> PlaybackMediaMarkerReached;
[add: Windows.Foundation.Metadata.Deprecated("Use media tracks on MediaPlaybackItem instead of PlaybackMediaMarkers.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.Foundation.UniversalApiContract")]
[remove: Windows.Foundation.Metadata.Deprecated("Use media tracks on MediaPlaybackItem instead of PlaybackMediaMarkers.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.Foundation.UniversalApiContract")]
public event TypedEventHandler<MediaPlayer,PlaybackMediaMarkerReachedEventArgs> PlaybackMediaMarkerReached;
function onPlaybackMediaMarkerReached(eventArgs) { /* Your code */ }
mediaPlayer.addEventListener("playbackmediamarkerreached", onPlaybackMediaMarkerReached);
mediaPlayer.removeEventListener("playbackmediamarkerreached", onPlaybackMediaMarkerReached);
- or -
mediaPlayer.onplaybackmediamarkerreached = onPlaybackMediaMarkerReached;
Public Custom Event PlaybackMediaMarkerReached As TypedEventHandler(Of MediaPlayer, PlaybackMediaMarkerReachedEventArgs) 

事件類型

屬性

適用於