MediaStreamSource.Duration | duration property

Applies to Windows and Windows Phone

Gets or sets the duration of the media time-line.

Syntax


public TimeSpan Duration { get; set; }

Property value

Type: Number [JavaScript] | System.TimeSpan [.NET] | Windows::Foundation::TimeSpan [C++]

The duration of the media time-line. The default value is 0.

Remarks

Applications that support seeking and set CanSeek to true must also assign a value to the Duration property.

The default value is 0, which means that the duration is unspecified. Live media or media that is being generated in real-time might have a Duration value of 0, since the actual duration is unknown.

Applications are allowed to change the value of this property at any time. For example, after a live broadcast has ended, the Duration value can be updated from 0 to the actual length of the live broadcast.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Media.Core
Windows::Media::Core [C++]

Metadata

Windows.winmd

See also

MediaStreamSource

 

 

Show:
© 2014 Microsoft