MediaPlaybackSession.Position MediaPlaybackSession.Position MediaPlaybackSession.Position MediaPlaybackSession.Position MediaPlaybackSession.Position Property

Definition

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

public : TimeSpan Position { get; set; }
TimeSpan Position();

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

Property Value

TimeSpan TimeSpan TimeSpan

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.