MPD processing utility functions.
- Source:
Members
-
(static, constant) GAP_OVERLAP_TOLERANCE_SECONDS :number
-
Specifies how tolerant the player is to inaccurate segment start times and end times within a manifest. For example, gaps or overlaps between segments in a SegmentTimeline which are greater than or equal to this value will result in a warning message.
Type:
- number
- Source:
Methods
-
(static) createTimeline(segmentTimelinenon-null, timescale, presentationTimeOffset, periodDuration) → (non-null) {Array.<shaka.dash.MpdUtils.TimeRange>}
-
Expands a SegmentTimeline into an array-based timeline. The results are in seconds.
Parameters:
Name Type Description segmentTimelineElement timescalenumber presentationTimeOffsetnumber periodDurationnumber The Period's duration in seconds. Infinity indicates that the Period continues indefinitely. - Source:
Returns:
- Type
- Array.<shaka.dash.MpdUtils.TimeRange>
-
(static) fillUriTemplate(uriTemplate, representationIdnullable, numbernullable, bandwidthnullable, timenullable) → {string}
-
Fills a SegmentTemplate URI template. This function does not validate the resulting URI.
Parameters:
Name Type Attributes Description uriTemplatestring representationIdstring <nullable>
numbernumber <nullable>
bandwidthnumber <nullable>
timenumber <nullable>
- Source:
- See:
-
- ISO/IEC 23009-1:2014 section 5.3.9.4.4
Returns:
A URI string.- Type
- string
-
(static) fitSegmentReferences(dynamic, periodDurationnullable, referencesnon-null)
-
Expands the first SegmentReference so it begins at the start of its Period if it already begins close to the start of its Period, and expands or contracts the last SegmentReference so it ends at the end of its Period for VOD presentations.
Parameters:
Name Type Attributes Description dynamicboolean periodDurationnumber <nullable>
referencesArray.<!shaka.media.SegmentReference> - Source:
-
(static) inheritAttribute(context, callback, attribute) → (nullable) {string}
-
Searches the inheritance for a Segment* with the given attribute.
Parameters:
Name Type Description contextshaka.dash.DashParser.Context callbackfunction(?shaka.dash.DashParser.InheritanceFrame): Element Gets the Element that contains the attribute to inherit. attributestring - Source:
Returns:
- Type
- string
-
(static) inheritChild(context, callback, child) → {Element}
-
Searches the inheritance for a Segment* with the given child.
Parameters:
Name Type Description contextshaka.dash.DashParser.Context callbackfunction(?shaka.dash.DashParser.InheritanceFrame): Element Gets the Element that contains the child to inherit. childstring - Source:
Returns:
- Type
- Element
-
(static) parseSegmentInfo(context, callback) → {shaka.dash.MpdUtils.SegmentInfo}
-
Parses common segment info for SegmentList and SegmentTemplate.
Parameters:
Name Type Description contextshaka.dash.DashParser.Context callbackfunction(?shaka.dash.DashParser.InheritanceFrame): Element Gets the element that contains the segment info. - Source:
Returns:
-
(static) resolveUris(baseUrisnon-null, relativeUrisnon-null) → (non-null) {Array.<string>}
-
Resolves an array of relative URIs to the given base URIs. This will result in M*N number of URIs.
Parameters:
Name Type Description baseUrisArray.<string> relativeUrisArray.<string> - Source:
Returns:
- Type
- Array.<string>
Type Definitions
-
SegmentInfo
-
Contains common information between SegmentList and SegmentTemplate items.
Type:
- {timescale: number, segmentDuration: ?number, startNumber: number, presentationTimeOffset: number, timeline: Array.<shaka.dash.MpdUtils.TimeRange>}
Properties:
Name Type Attributes Description timescalenumber The time-scale of the representation. segmentDurationnumber <nullable>
The duration of the segments in seconds, if given. startNumbernumber The start number of the segments; 1 or greater. presentationTimeOffsetnumber The presentationTimeOffset of the representation, in seconds. timelineArray.<shaka.dash.MpdUtils.TimeRange> The timeline of the representation, if given. Times in seconds. - Source:
-
TimeRange
-
Defines a time range of a media segment. Times are in seconds.
Type:
- {start: number, end: number}
Properties:
Name Type Description startnumber The start time of the range. endnumber The end time (exclusive) of the range. - Source: