共用方式為


MediaPlayer.MediaPlayerRateChanged 事件

定義

發生于媒體播放速率變更時。

注意

MediaPlayer.MediaPlayerRateChanged可能會在 Windows 10 1607 版之後變更或無法使用。 請改用 MediaPlayer.PlaybackSession 屬性來取得 MediaPlaybackSession 物件,然後使用 MediaPlaybackSession.PlaybackRateChanged 事件。

// Register
event_token MediaPlayerRateChanged(TypedEventHandler<MediaPlayer, MediaPlayerRateChangedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
MediaPlayer::MediaPlayerRateChanged_revoker MediaPlayerRateChanged(auto_revoke_t, TypedEventHandler<MediaPlayer, MediaPlayerRateChangedEventArgs const&> const& handler) const;
/// [add: Windows.Foundation.Metadata.Deprecated("Use PlaybackSession.PlaybackRateChanged instead of MediaPlayerRateChanged.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 196608, "Windows.Foundation.UniversalApiContract")]
/// [remove: Windows.Foundation.Metadata.Deprecated("Use PlaybackSession.PlaybackRateChanged instead of MediaPlayerRateChanged.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 196608, "Windows.Foundation.UniversalApiContract")]
// Register
event_token MediaPlayerRateChanged(TypedEventHandler<MediaPlayer, MediaPlayerRateChangedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
MediaPlayer::MediaPlayerRateChanged_revoker MediaPlayerRateChanged(auto_revoke_t, TypedEventHandler<MediaPlayer, MediaPlayerRateChangedEventArgs const&> const& handler) const;
public event TypedEventHandler<MediaPlayer,MediaPlayerRateChangedEventArgs> MediaPlayerRateChanged;
[add: Windows.Foundation.Metadata.Deprecated("Use PlaybackSession.PlaybackRateChanged instead of MediaPlayerRateChanged.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 196608, "Windows.Foundation.UniversalApiContract")]
[remove: Windows.Foundation.Metadata.Deprecated("Use PlaybackSession.PlaybackRateChanged instead of MediaPlayerRateChanged.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 196608, "Windows.Foundation.UniversalApiContract")]
public event TypedEventHandler<MediaPlayer,MediaPlayerRateChangedEventArgs> MediaPlayerRateChanged;
function onMediaPlayerRateChanged(eventArgs) { /* Your code */ }
mediaPlayer.addEventListener("mediaplayerratechanged", onMediaPlayerRateChanged);
mediaPlayer.removeEventListener("mediaplayerratechanged", onMediaPlayerRateChanged);
- or -
mediaPlayer.onmediaplayerratechanged = onMediaPlayerRateChanged;
Public Custom Event MediaPlayerRateChanged As TypedEventHandler(Of MediaPlayer, MediaPlayerRateChangedEventArgs) 

事件類型

屬性

適用於