MediaPlayer.PlaybackMediaMarkerReached 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在播放期间到达媒体标记时发生。
注意
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)
事件类型
- 属性