Expand Minimize

MediaElement.PlaybackRate property

Applies to Windows and Windows Phone

Gets or sets the playback rate ratio for the media engine.

Syntax


public double PlaybackRate { get; set; }


<MediaElement PlaybackRate="double"/>

Property value

Type: System.Double [.NET] | float64 [C++]

The playback rate ratio for the media. A value of 1.0 is the normal playback speed. Value can be negative to play backwards.

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.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

MediaElement

 

 

Show:
© 2014 Microsoft