Delen via


MediaElement.DefaultPlaybackRate Property

Definition

Gets or sets the default playback rate for the media engine. The playback rate applies when the user isn't using fast forward or reverse.

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

void DefaultPlaybackRate(double value);
public double DefaultPlaybackRate { get; set; }
var double = mediaElement.defaultPlaybackRate;
mediaElement.defaultPlaybackRate = double;
Public Property DefaultPlaybackRate As Double
<MediaElement DefaultPlaybackRate="double"/>

Property Value

Double

double

The default playback rate. The default is 1.0, which indicates normal playback speed.

Remarks

The current PlaybackRate is set to the value of DefaultPlaybackRate whenever Play is called. So setting DefaultPlaybackRate to a different value has no effect until Play is called.

To set a rate that will persist throughout the lifetime of the MediaElement, use DefaultPlaybackRate. Once playback ends, due to the MediaEnded event being raised or if Pause or Stop are called, the PlaybackRate will be effectively lost.

Applies to