Constructor
new SegmentBase()
A set of functions for parsing SegmentBase elements.
- Source:
Methods
checkSegmentIndexRangeSupport_(context, initSegmentReference)
    Check if this type of segment index is supported.  This allows for
immediate errors during parsing, as opposed to an async error from
createSegmentIndex().
Also checks for a valid byte range, which is not required for callers from
SegmentTemplate.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| context | shaka.dash.DashParser.Context | |
| initSegmentReference | shaka.media.InitSegmentReference | 
- Source:
checkSegmentIndexSupport(context, initSegmentReference)
    Check if this type of segment index is supported.  This allows for
immediate errors during parsing, as opposed to an async error from
createSegmentIndex().
    Parameters:
| Name | Type | Description | 
|---|---|---|
| context | shaka.dash.DashParser.Context | |
| initSegmentReference | shaka.media.InitSegmentReference | 
- Source:
computeIndexRange_(context) → {?{start: number, end: number}}
    Compute the byte range of the segment index from the container.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| context | shaka.dash.DashParser.Context | 
- Source:
Returns:
- Type
- ?{start: number, end: number}
computeIndexUris_(context) → {Array.<string>}
    Compute the URIs of the segment index from the container.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| context | shaka.dash.DashParser.Context | 
- Source:
Returns:
- Type
- Array.<string>
createInitSegment(context, callback) → {shaka.media.InitSegmentReference}
    Creates an init segment reference from a Context object.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| context | shaka.dash.DashParser.Context | |
| callback | function(?shaka.dash.DashParser.InheritanceFrame):Element | 
- Source:
Returns:
createQualityInfo(contextnon-null) → {shaka.extern.MediaQualityInfo}
    Create a MediaQualityInfo object from a Context object.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| context | shaka.dash.DashParser.Context | 
- Source:
Returns:
createStreamInfo(context, requestInitSegment) → {shaka.dash.DashParser.StreamInfo}
    Creates a new StreamInfo object.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| context | shaka.dash.DashParser.Context | |
| requestInitSegment | shaka.dash.DashParser.RequestInitSegmentCallback | 
- Source:
Returns:
fromInheritance_(framenullable) → {Element}
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| frame | shaka.dash.DashParser.InheritanceFrame | <nullable> | 
- Source:
Returns:
- Type
- Element
generateSegmentIndex_(context, requestInitSegment, initSegmentReference, scaledPresentationTimeOffset) → {Promise.<shaka.media.SegmentIndex>}
    Generate a SegmentIndex from a Context object.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| context | shaka.dash.DashParser.Context | |
| requestInitSegment | shaka.dash.DashParser.RequestInitSegmentCallback | |
| initSegmentReference | shaka.media.InitSegmentReference | |
| scaledPresentationTimeOffset | number | 
- Source:
Returns:
- Type
- Promise.<shaka.media.SegmentIndex>
generateSegmentIndexFromUris(context, requestInitSegment, initSegmentReference, urisnon-null, startByte, endBytenullable, scaledPresentationTimeOffset) → {Promise.<shaka.media.SegmentIndex>}
    Creates a SegmentIndex for the given URIs and context.
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| context | shaka.dash.DashParser.Context | ||
| requestInitSegment | shaka.dash.DashParser.RequestInitSegmentCallback | ||
| initSegmentReference | shaka.media.InitSegmentReference | ||
| uris | Array.<string> | ||
| startByte | number | ||
| endByte | number | <nullable> | |
| scaledPresentationTimeOffset | number | 
- Source:
Returns:
- Type
- Promise.<shaka.media.SegmentIndex>