MediaInitializationSegment Class

An initialization segment of a SourceBuffer (https://w3c.github.io/media-source/#init-segment): the tracks of the next media segments.

public sealed class MediaInitializationSegment

Constructors

NameDescription
MediaInitializationSegment(IReadOnlyList<MediaSegmentTrack>, double)Creates an initialization segment.

MediaInitializationSegment(IReadOnlyList<MediaSegmentTrack>, double)

MediaSegmentParser.cs

Creates an initialization segment.

public MediaInitializationSegment(IReadOnlyList<MediaSegmentTrack> tracks, double duration = double.NaN)

Parameters

tracks IReadOnlyList<MediaSegmentTrack>
The audio and video tracks of the segment.
duration double
The duration of the presentation in seconds, or NaN when the segment has none (the duration of the MediaSource is then infinite).

Properties

NameDescription
DurationGets the duration of the presentation in seconds, or NaN.
TracksGets the audio and video tracks of the segment.

Gets the duration of the presentation in seconds, or NaN.

public double Duration { get; }

Property value

double

Gets the audio and video tracks of the segment.

public IReadOnlyList<MediaSegmentTrack> Tracks { get; }