A set of functions for parsing SegmentList elements.
- Source:
Methods
-
(private, static) checkSegmentListInfo_(context, info)
-
Checks whether a SegmentListInfo object is valid.
Parameters:
Name Type Description contextshaka.dash.DashParser.Context infoshaka.dash.SegmentList.SegmentListInfo - Source:
Throws:
shaka.util.Error When there is a parsing error. -
(private, static) createSegmentReferences_(periodDurationnullable, startNumber, baseUrisnon-null, info) → (non-null) {Array.<!shaka.media.SegmentReference>}
-
Creates an array of segment references for the given data.
Parameters:
Name Type Attributes Description periodDurationnumber <nullable>
in seconds. startNumbernumber baseUrisArray.<string> infoshaka.dash.SegmentList.SegmentListInfo - Source:
Returns:
- Type
- Array.<!shaka.media.SegmentReference>
-
(static) createStream(context, segmentIndexMapnon-null) → {shaka.dash.DashParser.StreamInfo}
-
Creates a new Stream object or updates the Stream in the manifest.
Parameters:
Name Type Description contextshaka.dash.DashParser.Context segmentIndexMapObject.<string, !shaka.media.SegmentIndex> - Source:
Returns:
-
(private, static) fromInheritance_(framenullable) → {Element}
-
Parameters:
Name Type Attributes Description frameshaka.dash.DashParser.InheritanceFrame <nullable>
- Source:
Returns:
- Type
- Element
-
(private, static) parseMediaSegments_(context) → (non-null) {Array.<shaka.dash.SegmentList.MediaSegment>}
-
Parses the media URIs from the context.
Parameters:
Name Type Description contextshaka.dash.DashParser.Context - Source:
Returns:
- Type
- Array.<shaka.dash.SegmentList.MediaSegment>
-
(private, static) parseSegmentListInfo_(context) → {shaka.dash.SegmentList.SegmentListInfo}
-
Parses the SegmentList items to create an info object.
Parameters:
Name Type Description contextshaka.dash.DashParser.Context - Source:
Returns:
Type Definitions
-
MediaSegment
-
Type:
- {mediaUri: string, start: number, end: ?number}
Properties:
Name Type Attributes Description mediaUristring The URI of the segment. startnumber The start byte of the segment. endnumber <nullable>
The end byte of the segment, or null. - Source:
-
SegmentListInfo
-
Contains information about a SegmentList.
Type:
- {segmentDuration: ?number, startTime: number, startNumber: number, scaledPresentationTimeOffset: number, timeline: Array.<shaka.dash.MpdUtils.TimeRange>, mediaSegments: !Array.<shaka.dash.SegmentList.MediaSegment>}
Properties:
Name Type Attributes Description segmentDurationnumber <nullable>
The duration of the segments, if given. startTimenumber The start time of the first segment, in seconds. startNumbernumber The start number of the segments; 1 or greater. scaledPresentationTimeOffsetnumber The scaledPresentationTimeOffset of the representation, in seconds. timelineArray.<shaka.dash.MpdUtils.TimeRange> The timeline of the representation, if given. Times in seconds. mediaSegmentsArray.<shaka.dash.SegmentList.MediaSegment> The URI and byte-ranges of the media segments. - Source: