MediaPlayer.PlaybackRate MediaPlayer.PlaybackRate MediaPlayer.PlaybackRate MediaPlayer.PlaybackRate 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 : double PlaybackRate { get; set; }
double PlaybackRate();

void PlaybackRate(double playbackrate);
public double PlaybackRate { get; set; }
Public ReadWrite Property PlaybackRate As double
var double = mediaPlayer.playbackRate;
mediaPlayer.playbackRate = double;

Property Value

double double double

The playback rate, expressed as a percentage.

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.