Constructor
new SegmentList()
A set of functions for parsing SegmentList elements.
- Source:
Methods
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:
createSegmentReferences_(periodStart, periodDurationnullable, startNumber, baseUrisnon-null, info, initSegmentReference) → {Array.<!shaka.media.SegmentReference>}
    Creates an array of segment references for the given data.
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| periodStart | number | in seconds. | |
| periodDuration | number | <nullable> | in seconds. | 
| startNumber | number | ||
| baseUris | Array.<string> | ||
| info | shaka.dash.SegmentList.SegmentListInfo | ||
| initSegmentReference | shaka.media.InitSegmentReference | 
- Source:
Returns:
- Type
- Array.<!shaka.media.SegmentReference>
createStreamInfo(context, streamMapnon-null) → {shaka.dash.DashParser.StreamInfo}
    Creates a new StreamInfo object.
Updates the existing SegmentIndex, if any.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| context | shaka.dash.DashParser.Context | |
| streamMap | Object.<string, !shaka.extern.Stream> | 
- Source:
Returns:
fromInheritance_(framenullable) → {Element}
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| frame | shaka.dash.DashParser.InheritanceFrame | <nullable> | 
- Source:
Returns:
- Type
- Element
parseMediaSegments_(context) → {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>
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, scaledPresentationTimeOffset: number, timeline: Array.<shaka.media.PresentationTimeline.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. | |
| scaledPresentationTimeOffset | number | The scaledPresentationTimeOffset of the representation, in seconds. | |
| timeline | Array.<shaka.media.PresentationTimeline.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: