Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library

NaturalDuration Property

Gets the natural duration of the media.

XAML
Cannot be used in XAML.
Scripting
value = object.NaturalDuration

Property Value

Duration

The natural duration of the media.

This property is read-only. The default value is Automatic, which is the value held if you query this property before MediaOpened.

Remarks

The property value is not available until the MediaOpened event has been raised.

If the opened media is live streaming media, NaturalDuration is null.

Once you have the Duration, you can get its Seconds value.

Applies To

MediaElement

See Also

Media Overview
Supported Media Formats and Protocols

Community Additions

Show:
© 2015 Microsoft