MediaPlayer.NaturalDuration プロパティ

定義

PlaybackRate を適用せずに、メディアの実際の期間を取得します。

注意

MediaPlayer.NaturalDuration は、バージョン 1607 Windows 10後に変更または使用できない場合があります。 代わりに、 MediaPlayer.PlaybackSession プロパティを使用して MediaPlaybackSession オブジェクトを取得し、 MediaPlaybackSession.NaturalDuration プロパティを使用します。

public:
 property TimeSpan NaturalDuration { TimeSpan get(); };
TimeSpan NaturalDuration();
/// [get: Windows.Foundation.Metadata.Deprecated("Use PlaybackSession.NaturalDuration instead of NaturalDuration.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 196608, "Windows.Foundation.UniversalApiContract")]
TimeSpan NaturalDuration();
public System.TimeSpan NaturalDuration { get; }
public System.TimeSpan NaturalDuration { [Windows.Foundation.Metadata.Deprecated("Use PlaybackSession.NaturalDuration instead of NaturalDuration.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 196608, "Windows.Foundation.UniversalApiContract")] get; }
var timeSpan = mediaPlayer.naturalDuration;
Public ReadOnly Property NaturalDuration As TimeSpan

プロパティ値

PlaybackRate を適用しないメディアの実際の期間。

属性

適用対象