MediaPlayer.NaturalDuration MediaPlayer.NaturalDuration MediaPlayer.NaturalDuration MediaPlayer.NaturalDuration MediaPlayer.NaturalDuration Property

Definition

Get the actual duration of the media without applying the PlaybackRate.

Note

MediaPlayer.NaturalDuration 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.NaturalDuration property.

public : TimeSpan NaturalDuration { get; }
TimeSpan NaturalDuration();
public TimeSpan NaturalDuration { get; }
Public ReadOnly Property NaturalDuration As TimeSpan
var timeSpan = mediaPlayer.naturalDuration;

Property Value

TimeSpan TimeSpan TimeSpan

The actual duration of the media without applying the PlaybackRate.