Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

MediaPlaybackSession.Position Property

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Gets or sets the current playback position within the currently playing media.

public:
 property TimeSpan Position { TimeSpan get(); void set(TimeSpan value); };
TimeSpan Position();

void Position(TimeSpan value);
public System.TimeSpan Position { get; set; }
var timeSpan = mediaPlaybackSession.position;
mediaPlaybackSession.position = timeSpan;
Public Property Position As TimeSpan

Property Value

The current playback position within the currently playing media.

Remarks

Note that after you call MediaPlayer.Pause, the time represented by the Position property may not be precisely accurate. Apps that need a frame-accurate position value, such as media editors, should call MediaPlayer.StepForwardOneFrame immediately after calling Pause before reading the Position value.

Applies to


Feedback

Was this page helpful?