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 MediaInitializationSegmentConstructors
| Name | Description |
|---|---|
| MediaInitializationSegment(IReadOnlyList<MediaSegmentTrack>, double) | Creates an initialization segment. |
MediaInitializationSegment(IReadOnlyList<MediaSegmentTrack>, double)
MediaSegmentParser.csCreates an initialization segment.
public MediaInitializationSegment(IReadOnlyList<MediaSegmentTrack> tracks, double duration = double.NaN)Parameters
tracksIReadOnlyList<MediaSegmentTrack>- The audio and video tracks of the segment.
durationdouble- The duration of the presentation in seconds, or NaN when the segment has none (the duration of the
MediaSourceis then infinite).
Properties
| Name | Description |
|---|---|
| Duration | Gets the duration of the presentation in seconds, or NaN. |
| InitData | Gets the Initialization Data of the segment (e.g. the pssh boxes of the movie box of an MP4 file, as one cenc Initialization Data), or an empty list. Each one fires an encrypted event at the media element (https://w3c.github.io/encrypted-media/#initdata-encountered). |
| Tracks | Gets the audio and video tracks of the segment. |
Duration
MediaSegmentParser.csInitData
MediaSegmentParser.csGets the Initialization Data of the segment (e.g. the pssh boxes of the movie box of an MP4 file, as one cenc Initialization Data), or an empty list. Each one fires an encrypted event at the media element (https://w3c.github.io/encrypted-media/#initdata-encountered).
public IReadOnlyList<MediaEncryptionInitData> InitData { get; init; }Property value
Tracks
MediaSegmentParser.csGets the audio and video tracks of the segment.
public IReadOnlyList<MediaSegmentTrack> Tracks { get; }