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 context
shaka.dash.DashParser.Context info
shaka.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 periodDuration
number <nullable>
in seconds. startNumber
number baseUris
Array.<string> info
shaka.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 context
shaka.dash.DashParser.Context segmentIndexMap
Object.<string, !shaka.media.SegmentIndex> - Source:
Returns:
-
(private, static) fromInheritance_(framenullable) → {Element}
-
Parameters:
Name Type Attributes Description frame
shaka.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 context
shaka.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 context
shaka.dash.DashParser.Context - Source:
Returns:
Type Definitions
-
MediaSegment
-
Type:
- {mediaUri: string, start: number, end: ?number}
Properties:
Name Type Attributes Description mediaUri
string The URI of the segment. start
number The start byte of the segment. end
number <nullable>
The end byte of the segment, or null. - Source:
-
SegmentListInfo
-
Contains information about a SegmentList.
Type:
- {segmentDuration: ?number, startTime: number, startNumber: number, presentationTimeOffset: number, timeline: Array.<shaka.dash.MpdUtils.TimeRange>, mediaSegments: !Array.<shaka.dash.SegmentList.MediaSegment>}
Properties:
Name Type Attributes Description segmentDuration
number <nullable>
The duration of the segments, if given. startTime
number The start time of the first segment, in seconds. startNumber
number The start number of the segments; 1 or greater. presentationTimeOffset
number The presentationTimeOffset of the representation, in seconds. timeline
Array.<shaka.dash.MpdUtils.TimeRange> The timeline of the representation, if given. Times in seconds. mediaSegments
Array.<shaka.dash.SegmentList.MediaSegment> The URI and byte-ranges of the media segments. - Source: