Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

SmoothStreamingMediaElement.Position Property

Gets or sets the position in the current stream.

Namespace:  Microsoft.Web.Media.SmoothStreaming
Assembly:  Microsoft.Web.Media.SmoothStreaming (in Microsoft.Web.Media.SmoothStreaming.dll)


public TimeSpan Position { get; set; }

Property Value

Type: System.TimeSpan
The position in the current stream.

For more information and for examples, see Position in Stream and Events.

The following example shows a delegate that assigns the Position property. Each time the user clicks the SeekButton element, the event handler adds a five-second interval to the position property until the current position plus five seconds is greater than the length of the media stream as specified by the EndPosition property.

        // Button seek interval.
        TimeSpan spanAdd = new TimeSpan(0, 0, 5);
        private void SeekButton_Click(object sender, RoutedEventArgs e)
        {
            if ((SmoothPlayer.Position + spanAdd) < SmoothPlayer.EndPosition)
            {
                SmoothPlayer.Position += spanAdd;
            }
        }

Silverlight

Supported in: 5

Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0
Show:
© 2015 Microsoft