Udostępnij za pośrednictwem


MediaPlaybackSession.Position Property

Definition

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