MediaPlayer.Position MediaPlayer.Position MediaPlayer.Position MediaPlayer.Position MediaPlayer.Position Property

Definition

Gets or sets the playback position within the media.

Note

MediaPlayer.Position may be altered or unavailable after Windows 10, version 1607. Instead, use the MediaPlayer.PlaybackSession property to get a MediaPlaybackSession object and then use the MediaPlaybackSession.Position property.

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

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

Property Value

TimeSpan TimeSpan TimeSpan

The playback position within the media.

Remarks

The position can't be moved forward while a MediaPlaybackItem with CanSkip set to false is playing. Attempting to do so will cause an exception to be thrown.