Position Property
IIS 7.0
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)
For more information and for examples, see Position in Stream (IIS Smooth Streaming) and Events (IIS Smooth Streaming).
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;
}
}
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.