Members
Methods
createTimeline(timePoints, timescale, unscaledPresentationTimeOffset, periodDuration, startNumber) → {Array.<shaka.media.PresentationTimeline.TimeRange>}
Expands a SegmentTimeline into an array-based timeline. The results are in
seconds.
Parameters:
Name | Type | Description |
---|---|---|
timePoints |
Array.<!shaka.extern.xml.Node> | |
timescale |
number | |
unscaledPresentationTimeOffset |
number | |
periodDuration |
number | The Period's duration in seconds. Infinity indicates that the Period continues indefinitely. |
startNumber |
number |
- Source:
Returns:
- Type
- Array.<shaka.media.PresentationTimeline.TimeRange>
fillUriTemplate(uriTemplate, representationIdnullable, numbernullable, subNumbernullable, bandwidthnullable, timenullable) → {string}
Fills a SegmentTemplate URI template. This function does not validate the
resulting URI.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
uriTemplate |
string | ||
representationId |
string |
<nullable> |
|
number |
number |
<nullable> |
|
subNumber |
number |
<nullable> |
|
bandwidth |
number |
<nullable> |
|
time |
number | bigint |
<nullable> |
- Source:
- See:
-
- ISO/IEC 23009-1:2014 section 5.3.9.4.4
Returns:
A URI string.
- Type
- string
getNodes(context, callback) → {Array.<!shaka.extern.xml.Node>}
Parses common attributes for Representation, AdaptationSet, and Period.
Parameters:
Name | Type | Description |
---|---|---|
context |
shaka.dash.DashParser.Context | |
callback |
function(?shaka.dash.DashParser.InheritanceFrame): ?shaka.extern.xml.Node |
- Source:
Returns:
- Type
- Array.<!shaka.extern.xml.Node>
handleXlinkInElement_(elementnon-null, retryParametersnon-null, failGracefully, baseUri, networkingEnginenon-null, linkDepth) → {shaka.util.AbortableOperation.<!shaka.extern.xml.Node>}
Follow the xlink link contained in the given element.
It also strips the xlink properties off of the element,
even if the process fails.
Parameters:
Name | Type | Description |
---|---|---|
element |
shaka.extern.xml.Node | |
retryParameters |
shaka.extern.RetryParameters | |
failGracefully |
boolean | |
baseUri |
string | |
networkingEngine |
shaka.net.NetworkingEngine | |
linkDepth |
number |
- Source:
Returns:
inheritAttribute(context, callback, attribute) → {string}
Searches the inheritance for a Segment* with the given attribute.
Parameters:
Name | Type | Description |
---|---|---|
context |
shaka.dash.DashParser.Context | |
callback |
function(?shaka.dash.DashParser.InheritanceFrame): ?shaka.extern.xml.Node | Gets the Element that contains the attribute to inherit. |
attribute |
string |
- Source:
Returns:
- Type
- string
inheritChild(context, callback, child) → {shaka.extern.xml.Node}
Searches the inheritance for a Segment* with the given child.
Parameters:
Name | Type | Description |
---|---|---|
context |
shaka.dash.DashParser.Context | |
callback |
function(?shaka.dash.DashParser.InheritanceFrame): ?shaka.extern.xml.Node | Gets the Element that contains the child to inherit. |
child |
string |
- Source:
Returns:
parseSegmentInfo(context, callback) → {shaka.dash.MpdUtils.SegmentInfo}
Parses common segment info for SegmentList and SegmentTemplate.
Parameters:
Name | Type | Description |
---|---|---|
context |
shaka.dash.DashParser.Context | |
callback |
function(?shaka.dash.DashParser.InheritanceFrame): ?shaka.extern.xml.Node | Gets the element that contains the segment info. |
- Source:
Returns:
processXlinks(elementnon-null, retryParametersnon-null, failGracefully, baseUri, networkingEnginenon-null, linkDepth,opt) → {shaka.util.AbortableOperation.<!shaka.extern.xml.Node>}
Filter the contents of a node recursively, replacing xlink links
with their associated online data.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
element |
shaka.extern.xml.Node | ||
retryParameters |
shaka.extern.RetryParameters | ||
failGracefully |
boolean | ||
baseUri |
string | ||
networkingEngine |
shaka.net.NetworkingEngine | ||
linkDepth, |
number |
<optional> |
default set to 0 |
- Source:
Returns:
Type Definitions
SegmentInfo
Contains common information between SegmentList and SegmentTemplate items.
Type:
- {timescale: number, segmentDuration: ?number, startNumber: number, scaledPresentationTimeOffset: number, unscaledPresentationTimeOffset: number, timeline: Array.<shaka.media.PresentationTimeline.TimeRange>}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
timescale |
number | The time-scale of the representation. | |
segmentDuration |
number |
<nullable> |
The duration of the segments in seconds, if given. |
startNumber |
number | The start number of the segments; 1 or greater. | |
scaledPresentationTimeOffset |
number | The presentation time offset of the representation, in seconds. | |
unscaledPresentationTimeOffset |
number | The presentation time offset of the representation, in timescale units. | |
timeline |
Array.<shaka.media.PresentationTimeline.TimeRange> | The timeline of the representation, if given. Times in seconds. |
- Source: