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
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for