SmoothStreamingMediaElement.SupportedPlaybackRates Property
Gets or sets the playback rates list.
Namespace: Microsoft.Web.Media.SmoothStreaming
Assembly: Microsoft.Web.Media.SmoothStreaming (in Microsoft.Web.Media.SmoothStreaming.dll)
Syntax
'Declaration
Public Property SupportedPlaybackRates As IList(Of Double)
Get
Set
'Usage
Dim instance As SmoothStreamingMediaElement
Dim value As IList(Of Double)
value = instance.SupportedPlaybackRates
instance.SupportedPlaybackRates = value
public IList<double> SupportedPlaybackRates { get; set; }
public:
property IList<double>^ SupportedPlaybackRates {
IList<double>^ get ();
void set (IList<double>^ value);
}
member SupportedPlaybackRates : IList<float> with get, set
function get SupportedPlaybackRates () : IList<double>
function set SupportedPlaybackRates (value : IList<double>)
Property Value
Type: System.Collections.Generic.IList<Double>
A list of numbers that represent the playback rates.
Remarks
For more information and for examples, see Fast Forward and Rewind Modes.
Note
This property currently is not supported for audio-only playback.
Examples
To set the playback rate, call the SetPlaybackRate method with a value from the SupportedPlaybackRates collection.
The following example shows how to get the available playback rates.
// Usable playback rates
IList<double> playbackRates = SmoothPlayer.SupportedPlaybackRates;
After the previous line of code runs, the list will contain the following values:
-8.0, -4.0, 0.5, 1, 4.0, 8.0.
Positive values set the playback rate to half the normal speed, 4.0 times the normal speed, or 8.0 times the normal speed. Negative values rewind the media stream at rates that are multiples of the normal speed by factors of -4.0 or -8.0.
The following example shows how to call the SetPlaybackRate method and pass it a value from the SupportedPlaybackRates collection.
SmoothPlayer.SetPlaybackRate(playbackRates[2]);
Version Information
Silverlight
Supported in: 5
Windows Phone
Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0