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, aesKey) → {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): ?shaka.extern.xml.Node | |
aesKey |
shaka.extern.aesKey | undefined |
- 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, requestSegment, aesKey) → {shaka.dash.DashParser.StreamInfo}
Creates a new StreamInfo object.
Parameters:
Name | Type | Description |
---|---|---|
context |
shaka.dash.DashParser.Context | |
requestSegment |
shaka.dash.DashParser.RequestSegmentCallback | |
aesKey |
shaka.extern.aesKey | undefined |
- Source:
Returns:
fromInheritance_(framenullable) → {shaka.extern.xml.Node}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
frame |
shaka.dash.DashParser.InheritanceFrame |
<nullable> |
- Source:
Returns:
generateSegmentIndex_(context, requestSegment, initSegmentReference, scaledPresentationTimeOffset) → {Promise.<shaka.media.SegmentIndex>}
Generate a SegmentIndex from a Context object.
Parameters:
Name | Type | Description |
---|---|---|
context |
shaka.dash.DashParser.Context | |
requestSegment |
shaka.dash.DashParser.RequestSegmentCallback | |
initSegmentReference |
shaka.media.InitSegmentReference | |
scaledPresentationTimeOffset |
number |
- Source:
Returns:
- Type
- Promise.<shaka.media.SegmentIndex>
generateSegmentIndexFromUris(context, requestSegment, 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 | ||
requestSegment |
shaka.dash.DashParser.RequestSegmentCallback | ||
initSegmentReference |
shaka.media.InitSegmentReference | ||
uris |
Array.<string> | ||
startByte |
number | ||
endByte |
number |
<nullable> |
|
scaledPresentationTimeOffset |
number |
- Source:
Returns:
- Type
- Promise.<shaka.media.SegmentIndex>