MediaPlayer.PlaybackRate Property

Definition

Gets or sets the playback rate, expressed as a ratio.

Note

MediaPlayer.PlaybackRate may be altered or unavailable after Windows 10, version 1607. Instead, use the MediaPlayer.PlaybackSession property to get a MediaPlaybackSession object and then use the MediaPlaybackSession.PlaybackRate property.

public:
 property double PlaybackRate { double get(); void set(double value); };
double PlaybackRate();

void PlaybackRate(double value);
/// [get: Windows.Foundation.Metadata.Deprecated("Use PlaybackSession.PlaybackRate instead of PlaybackRate.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 196608, "Windows.Foundation.UniversalApiContract")]
/// [set: Windows.Foundation.Metadata.Deprecated("Use PlaybackSession.PlaybackRate instead of PlaybackRate.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 196608, "Windows.Foundation.UniversalApiContract")]
double PlaybackRate();

void PlaybackRate(double value);
public double PlaybackRate { get; set; }
public double PlaybackRate { [Windows.Foundation.Metadata.Deprecated("Use PlaybackSession.PlaybackRate instead of PlaybackRate.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 196608, "Windows.Foundation.UniversalApiContract")] get; [Windows.Foundation.Metadata.Deprecated("Use PlaybackSession.PlaybackRate instead of PlaybackRate.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 196608, "Windows.Foundation.UniversalApiContract")] set; }
var double = mediaPlayer.playbackRate;
mediaPlayer.playbackRate = double;
Public Property PlaybackRate As Double

Property Value

Double

double

The playback rate, expressed as a ratio.

Attributes

Remarks

This value is expressed as a ratio of the desired playback speed to normal playback speed. For example, a value of 1.5 sets the playback rate to 150% of the original.

The playback rate can't be set to a value greater than 1.0 while a MediaPlaybackItem with CanSkip set to false is playing. Attempting to do so will cause an exception to be thrown.

Applies to