MediaStreamSource.SeekAsync Method

May 11, 2014

The MediaElement calls this method to ask the MediaStreamSource to seek to the nearest randomly accessible point before the specified time. Developers respond to this method by calling ReportSeekCompleted and by ensuring future calls to ReportGetSampleCompleted will return samples from that point in the media.

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)

protected abstract void SeekAsync(
	long seekToTime
)

Parameters

seekToTime
Type: System.Int64
The time as represented by 100 nanosecond increments to seek to. This is typically measured from the beginning of the media file.

If the MediaElement was opened with MediaSourceAttributesKeys.CanSeek attribute equal to Boolean.FalseString, then SeekAsync will only be called with the seekToTime value equal to zero. The MediaElement also ensures seekToTime is less than or equal to the duration reported in ReportOpenMediaCompleted.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft