Export (0) Print
Expand All
Expand Minimize

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)

function get Position () : TimeSpan
function set Position (value : TimeSpan)

Property Value

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

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: 4

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.0

Show:
© 2014 Microsoft