Udostępnij za pośrednictwem


MediaStreamSource.Duration Property

Definition

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

public:
 property TimeSpan Duration { TimeSpan get(); void set(TimeSpan value); };
TimeSpan Duration();

void Duration(TimeSpan value);
public System.TimeSpan Duration { get; set; }
var timeSpan = mediaStreamSource.duration;
mediaStreamSource.duration = timeSpan;
Public Property Duration As TimeSpan

Property Value

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.

Applies to