Constructor
new DashParser()
Creates a new DASH parser.
- Implements:
- Source:
Members
SUPPORTED_ESSENTIAL_PROPERTIES_ :Set<string>
The set of EssentialProperty scheme URIs recognized by the parser. This is
the single source of truth for EssentialProperty support and is used to:
- enforce the MPD-level conformance rule of ISO/IEC 23009-1 clause 5.8.4.8
(if an MPD-level EssentialProperty, or a group sharing the same id
attribute, uses only schemes outside this set, the presentation must be
terminated); and
- decide in parseAdaptationSet_ whether an unrecognized EssentialProperty
makes the containing AdaptationSet unusable.
Keep this in sync with the scheme handling in parseAdaptationSet_ and
parseRepresentation_. Schemes that are recognized but intentionally ignored
(e.g. MatrixCoefficients, pattern:2024, urlparam:2025) are listed here
without dedicated handling.
Type:
- Set<string>
- Source:
UP_NAMESPACE_2014_ :string
Namespace of the UrlQueryInfo element used by the urlparam:2014 scheme.
Type:
- string
- Source:
UP_NAMESPACE_2016_ :string
Namespace of the ExtUrlQueryInfo / ExtHttpHeaderInfo elements used by the
urlparam:2016 scheme.
Type:
- string
- Source:
URL_PARAM_DESCRIPTOR_SCHEMES_ :Set<string>
The EssentialProperty/SupplementalProperty scheme URIs that signal flexible
insertion of URL query parameters via a UrlQueryInfo (2014) or
ExtUrlQueryInfo (2016) child element (ISO/IEC 23009-1 Annex I). The
urlparam:2025 scheme is handled separately through RequestParam elements.
Type:
- Set<string>
- Source:
averageUpdateDuration_ :shaka.abr.Ewma
An ewma that tracks how long updates take.
This is to mitigate issues caused by slow parsing on embedded devices.
Type:
- Source:
contextCache_ :Map<string, !shaka.dash.DashParser.Context>
This is a cache is used the store a snapshot of the context
object which is built up throughout node traversal to maintain
a current state. This data needs to be preserved for parsing
patches.
The key is a combination period and representation id's.
Type:
- Map<string, !shaka.dash.DashParser.Context>
- Source:
continuityCache_ :Map<string, {endTime: number, timeline: number, reps: Array<string>}>
Type:
- Map<string, {endTime: number, timeline: number, reps: Array<string>}>
- Source:
indexStreamMap_ :Map<string, !Array<string>>
A map of Period IDs to Stream Map IDs.
Use to have direct access to streamMap key.
Type:
- Map<string, !Array<string>>
- Source:
largestPeriodStartTime_ :number
Largest period start time seen.
Type:
- number
- Source:
lastCalculatedBaseUris_ :Array<string>
Type:
- Array<string>
- Source:
lastManifestUpdatePeriodIds_ :Array<string>
Period IDs seen in previous manifest.
Type:
- Array<string>
- Source:
manifestPatchContext_ :shaka.dash.DashParser.PatchContext
A context of the living manifest used for processing
Patch MPD's
Type:
- Source:
minTotalAvailabilityTimeOffset_ :number
The minimum of the availabilityTimeOffset values among the adaptation
sets.
Type:
- number
- Source:
parsedPeriodCache_ :Map<string, !shaka.extern.Period>
Cache of parsed periods keyed by Period ID.
Type:
- Map<string, !shaka.extern.Period>
- Source:
parsedPrftNodes_ :Set<!shaka.extern.xml.Node>
Used to track which prft nodes have been already parsed to avoid
duplicating work for all representations.
Type:
- Set<!shaka.extern.xml.Node>
- Source:
periodDurations_ :Map<string, number>
A map of period ids to their durations
Type:
- Map<string, number>
- Source:
streamMap_ :Map<string, !shaka.extern.Stream>
A map of IDs to Stream objects.
ID: Period@id,Representation@id
e.g.: '1,23'
Type:
- Map<string, !shaka.extern.Stream>
- Source:
updatePeriod_ :number
The update period in seconds, or 0 for no updates.
Type:
- number
- Source:
Methods
guessContentType_(mimeType, codecs) → {string}
Guess the content type based on MIME type and codecs.
Parameters:
| Name | Type | Description |
|---|---|---|
mimeType |
string | |
codecs |
string |
- Source:
Returns:
- Type
- string
isNtpScheme_(scheme) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
scheme |
string |
- Source:
Returns:
- Type
- boolean
makeBaseUriGetter_(contentSteeringManagernullable, someLocationValid, lastCalculatedBaseUris) → {function(): !Array<string>}
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
contentSteeringManager |
shaka.util.ContentSteeringManager |
<nullable> |
|
someLocationValid |
boolean | ||
lastCalculatedBaseUris |
Array<string> |
- Source:
Returns:
- Type
- function(): !Array<string>
banLocation(uri)
Tells the parser that a location should be banned. This is called on
retry.
Parameters:
| Name | Type | Description |
|---|---|---|
uri |
string |
- Implements:
- Source:
buildUrlQueryFn_(elemnon-null) → {?function(): string}
Builds a URL query-parameters function from an element carrying the
UrlQueryInfo / ExtendedUrlInfo attributes (@useMPDUrlQuery, @queryString
and @queryTemplate). This is the shared engine for the urlparam:2014,
urlparam:2016 and urlparam:2025 schemes (ISO/IEC 23009-1 Annex I); the
element is either a UrlQueryInfo/ExtUrlQueryInfo child (2014/2016) or a
RequestParam element (2025).
Parameters:
| Name | Type | Description |
|---|---|---|
elem |
shaka.extern.xml.Node |
- Source:
Returns:
- Type
- ?function(): string
checkMpdEssentialProperties_(mpdnon-null)
Enforces the EssentialProperty conformance rule at MPD level
(ISO/IEC 23009-1 clause 5.8.4.8). EssentialProperty descriptors are
grouped by their id attribute, and for each group at least one scheme must
be recognized by the parser. If a whole group is unrecognized, the content
cannot be presented and parsing fails.
Parameters:
| Name | Type | Description |
|---|---|---|
mpd |
shaka.extern.xml.Node |
- Source:
cleanContinuityCache_(periodsnon-null)
Clean continuityCache Object to remove reference of removed periods.
This should end up running after the current manifest has been processed
so that it can use previous periods to calculate the continuity of the new
periods.
Parameters:
| Name | Type | Description |
|---|---|---|
periods |
Array<shaka.extern.Period> |
- Source:
cleanStreamMap_()
Clean StreamMap Object to remove reference of deleted Stream Object
- Source:
cloneContext_(contextnon-null) → {shaka.dash.DashParser.Context}
Clone context and remove xml document references.
Parameters:
| Name | Type | Description |
|---|---|---|
context |
shaka.dash.DashParser.Context |
- Source:
Returns:
configure(config, isPreloadFnopt)
Called by the Player to provide an updated configuration any time the
configuration changes. Will be called at least once before start().
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
config |
shaka.extern.ManifestConfiguration | ||
isPreloadFn |
function |
<optional> |
- Implements:
- Source:
createFrame_(elemnon-null, parentnullable, getBaseUrisnullable) → {shaka.dash.DashParser.InheritanceFrame}
Creates a new inheritance frame for the given element.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
elem |
shaka.extern.xml.Node | ||
parent |
shaka.dash.DashParser.InheritanceFrame |
<nullable> |
|
getBaseUris |
?function(): !Array<string> |
<nullable> |
- Source:
Returns:
emsgSchemeIdUris_(inBandEventStreamsnon-null, emsgSchemeIdUrisnon-null) → {Array<string>}
Returns a new array of InbandEventStream schemeIdUri containing the union
of the ones parsed from inBandEventStreams and the ones provided in
emsgSchemeIdUris.
Parameters:
| Name | Type | Description |
|---|---|---|
inBandEventStreams |
Array<!shaka.extern.xml.Node> | Array of InbandEventStream elements to parse and add to the returned array. |
emsgSchemeIdUris |
Array<string> | Array of parsed InbandEventStream schemeIdUri attributes to add to the returned array. |
- Source:
Returns:
schemeIdUris Array of parsed
InbandEventStream schemeIdUri attributes.
- Type
- Array<string>
findRequestParamFn_(nodenon-null, includeInType) → {function|undefined}
Returns the URL params function for the last matching RequestParam child
element whose includeInRequests attribute contains includeInType or '*'.
Parameters:
| Name | Type | Description |
|---|---|---|
node |
shaka.extern.xml.Node | |
includeInType |
string |
- Source:
Returns:
- Type
- function | undefined
getContextIdsFromPath_(pathsnon-null) → {Array<string>}
Parameters:
| Name | Type | Description |
|---|---|---|
paths |
Array<shaka.util.TXml.PathNode> |
- Source:
Returns:
- Type
- Array<string>
getPatchLocationUris_() → {Array<string>}
- Source:
Returns:
- Type
- Array<string>
getStreamsFromSets_(disabled, adaptationSetsnon-null, contentType)
Gets the streams from the given sets or returns an empty array if disabled
or no streams are found.
Parameters:
| Name | Type | Description |
|---|---|---|
disabled |
boolean | |
adaptationSets |
Array<!shaka.dash.DashParser.AdaptationInfo> | |
contentType |
string |
- Source:
getURLParametersFunction_(elemnon-null) → {?function(): string}
Returns the URL query-parameters function for a urlparam:2014 or
urlparam:2016 EssentialProperty/SupplementalProperty descriptor, reading
its UrlQueryInfo (2014) or ExtUrlQueryInfo (2016) child element.
Parameters:
| Name | Type | Description |
|---|---|---|
elem |
shaka.extern.xml.Node |
- Source:
Returns:
- Type
- ?function(): string
isPreloadFn_()
- Source:
makeNetworkRequest_(request, type, contextopt) → {Promise<shaka.extern.Response>}
Create a networking request. This will manage the request using the
parser's operation manager.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
request |
shaka.extern.Request | ||
type |
shaka.net.NetworkingEngine.RequestType | ||
context |
shaka.extern.RequestContext |
<optional> |
- Source:
Returns:
- Type
- Promise<shaka.extern.Response>
modifySegmentTemplate_(patchNodenon-null) → {Array<string>}
Modifies SegmentTemplate based on MPD patch.
Parameters:
| Name | Type | Description |
|---|---|---|
patchNode |
shaka.extern.xml.Node |
- Source:
Returns:
context ids with updated timeline
- Type
- Array<string>
modifyTimepoints_(patchNodenon-null) → {Array<string>}
Ingests Patch MPD segments into timeline.
Parameters:
| Name | Type | Description |
|---|---|---|
patchNode |
shaka.extern.xml.Node |
- Source:
Returns:
context ids with updated timeline
- Type
- Array<string>
onExpirationUpdated(sessionId, expiration)
Tells the parser that the expiration time of an EME session has changed.
Implementing this is optional.
Parameters:
| Name | Type | Description |
|---|---|---|
sessionId |
string | |
expiration |
number |
- Implements:
- Source:
onInitialVariantChosen(variant)
Tells the parser that the initial variant has been chosen.
Parameters:
| Name | Type | Description |
|---|---|---|
variant |
shaka.extern.Variant |
- Implements:
- Source:
onUpdate_() → {Promise}
Called when the update timer ticks.
- Source:
Returns:
- Type
- Promise
parseAdaptationSet_(context, position, elemnon-null) → {shaka.dash.DashParser.AdaptationInfo}
Parses an AdaptationSet XML element.
Parameters:
| Name | Type | Description |
|---|---|---|
context |
shaka.dash.DashParser.Context | |
position |
number | |
elem |
shaka.extern.xml.Node | The AdaptationSet element. |
- Source:
Returns:
parseAudioChannels_(audioChannelConfigsnon-null) → {number}
Parameters:
| Name | Type | Description |
|---|---|---|
audioChannelConfigs |
Array<!shaka.extern.xml.Node> | An array of AudioChannelConfiguration elements. |
- Source:
Returns:
The number of audio channels, or null if unknown.
- Type
- number
parseEventStream_(periodStart, periodDurationnullable, elemnon-null, availabilityStart)
Parses an EventStream element.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
periodStart |
number | ||
periodDuration |
number |
<nullable> |
|
elem |
shaka.extern.xml.Node | ||
availabilityStart |
number |
- Source:
parseManifest(data, finalManifestUri, rootElement) → {Promise}
Parses the manifest XML. This also handles updates and will update the
stored manifest.
Parameters:
| Name | Type | Description |
|---|---|---|
data |
BufferSource | |
finalManifestUri |
string | The final manifest URI, which may differ from this.manifestUri_ if there has been a redirect. |
rootElement |
string | MPD or Patch, depending on context |
- Source:
Returns:
- Type
- Promise
parseMpdChaining_(mpdnon-null) → {string}
Reads chaining url.
Parameters:
| Name | Type | Description |
|---|---|---|
mpd |
shaka.extern.xml.Node |
- Source:
Returns:
- Type
- string
parsePatchMediaPresentationDurationChange_(durationString)
Parameters:
| Name | Type | Description |
|---|---|---|
durationString |
string |
- Source:
parsePatchMpdTypeChange_(mpdTypenon-null)
Handles manifest type changes, this transition is expected to be
"dynamic" to "static".
Parameters:
| Name | Type | Description |
|---|---|---|
mpdType |
string |
- Source:
parsePatchPeriod_(periodsnon-null)
Ingests a full MPD period element from a patch update
Parameters:
| Name | Type | Description |
|---|---|---|
periods |
shaka.extern.xml.Node |
- Source:
parsePatchSegment_(contextId)
Parses modified segments.
Parameters:
| Name | Type | Description |
|---|---|---|
contextId |
string |
- Source:
parsePeriod_(context, getBaseUris, periodInfo) → {shaka.extern.Period}
Parses a Period XML element. Unlike the other parse methods, this is not
given the Node; it is given a PeriodInfo structure. Also, partial parsing
was done before this was called so start and duration are valid.
Parameters:
| Name | Type | Description |
|---|---|---|
context |
shaka.dash.DashParser.Context | |
getBaseUris |
function(): !Array<string> | |
periodInfo |
shaka.dash.DashParser.PeriodInfo |
- Source:
Returns:
- Type
- shaka.extern.Period
parsePeriods_(context, getBaseUris, mpdnon-null, newPeriodnon-null) → {{periods: !Array<shaka.extern.Period>, duration: ?number, durationDerivedFromPeriods: boolean}}
Reads and parses the periods from the manifest. This first does some
partial parsing so the start and duration is available when parsing
children.
Parameters:
| Name | Type | Description |
|---|---|---|
context |
shaka.dash.DashParser.Context | |
getBaseUris |
function(): !Array<string> | |
mpd |
shaka.extern.xml.Node | |
newPeriod |
boolean |
- Source:
Returns:
- Type
- {periods: !Array<shaka.extern.Period>, duration: ?number, durationDerivedFromPeriods: boolean}
parseProducerReferenceTime_(prftNodenon-null, streamInfonon-null, presentationTimelinenon-null)
Parameters:
| Name | Type | Description |
|---|---|---|
prftNode |
shaka.extern.xml.Node | |
streamInfo |
shaka.dash.DashParser.StreamInfo | |
presentationTimeline |
shaka.media.PresentationTimeline |
- Source:
parseRepresentation_(context, contentProtection, kind, language, labelnullable, isPrimary, rolesnon-null, closedCaptions, nodenon-null, accessibilityPurposenullable, lastSegmentNumbernullable) → {shaka.extern.Stream}
Parses a Representation XML element.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
context |
shaka.dash.DashParser.Context | ||
contentProtection |
shaka.dash.ContentProtection.Context | ||
kind |
string | undefined | ||
language |
string | ||
label |
string |
<nullable> |
|
isPrimary |
boolean | ||
roles |
Array<string> | ||
closedCaptions |
Map<string, string> | ||
node |
shaka.extern.xml.Node | ||
accessibilityPurpose |
shaka.media.ManifestParser.AccessibilityPurpose |
<nullable> |
|
lastSegmentNumber |
number |
<nullable> |
- Source:
Returns:
The Stream, or null when there is a
non-critical parsing error.
- Type
- shaka.extern.Stream
parseServiceDescription_(mpdnon-null) → {shaka.extern.ServiceDescription}
Reads maxLatency and maxPlaybackRate properties from service
description element.
Parameters:
| Name | Type | Description |
|---|---|---|
mpd |
shaka.extern.xml.Node |
- Source:
Returns:
parseUtcTiming_(getBaseUris, elementsnon-null) → {Promise<number>}
Parses an array of UTCTiming elements.
Parameters:
| Name | Type | Description |
|---|---|---|
getBaseUris |
function(): !Array<string> | |
elements |
Array<!shaka.extern.xml.Node> |
- Source:
Returns:
- Type
- Promise<number>
periodIdFallback_(start) → {string}
Parameters:
| Name | Type | Description |
|---|---|---|
start |
number |
- Source:
Returns:
- Type
- string
postPeriodProcessing_(periodsnon-null, isPatchUpdate)
Handles common procedures after processing new periods.
Parameters:
| Name | Type | Description |
|---|---|---|
periods |
Array<shaka.extern.Period> | to be appended |
isPatchUpdate |
boolean | does call comes from mpd patch update |
- Source:
processManifest_(mpdnon-null, finalManifestUri) → {Promise}
Takes a formatted MPD and converts it into a manifest.
Parameters:
| Name | Type | Description |
|---|---|---|
mpd |
shaka.extern.xml.Node | |
finalManifestUri |
string | The final manifest URI, which may differ from this.manifestUri_ if there has been a redirect. |
- Source:
Returns:
- Type
- Promise
processParsedMpd(mpdnullable, finalManifestUri, rootElement) → {Promise}
Common point for processing an already parsed MPD (whether it comes from
direct XML or from JSON converted to XML by the subclass).
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
mpd |
shaka.extern.xml.Node |
<nullable> |
|
finalManifestUri |
string | ||
rootElement |
string |
- Source:
Returns:
- Type
- Promise
processPatchManifest_(mpdnon-null) → {Promise}
Takes a formatted Patch MPD and converts it into a manifest.
Parameters:
| Name | Type | Description |
|---|---|---|
mpd |
shaka.extern.xml.Node |
- Source:
Returns:
- Type
- Promise
prunePeriodCache_(periodsnon-null)
Parameters:
| Name | Type | Description |
|---|---|---|
periods |
Array<shaka.extern.Period> |
- Source:
removePatchPeriod_(periodId)
Parameters:
| Name | Type | Description |
|---|---|---|
periodId |
string |
- Source:
requestForTiming_(getBaseUris, uri, method) → {Promise<number>}
Makes a request to the given URI and calculates the clock offset.
Parameters:
| Name | Type | Description |
|---|---|---|
getBaseUris |
function(): !Array<string> | |
uri |
string | |
method |
string |
- Source:
Returns:
- Type
- Promise<number>
requestManifest_() → {Promise<number>}
Makes a network request for the manifest and parses the resulting data.
- Source:
Returns:
Resolves with the time it took, in seconds, to
fulfill the request and parse the data.
- Type
- Promise<number>
requestSegment_(urisnon-null, startBytenullable, endBytenullable, isInit) → {Promise<BufferSource>}
Makes a network request on behalf of SegmentBase.createStreamInfo.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
uris |
Array<string> | ||
startByte |
number |
<nullable> |
|
endByte |
number |
<nullable> |
|
isInit |
boolean |
- Source:
Returns:
- Type
- Promise<BufferSource>
setMediaElement(mediaElement)
Set media element.
Parameters:
| Name | Type | Description |
|---|---|---|
mediaElement |
HTMLMediaElement |
- Implements:
- Source:
setUpdateTimer_(offset)
Sets the update timer. Does nothing if the manifest does not specify an
update period.
Parameters:
| Name | Type | Description |
|---|---|---|
offset |
number | An offset, in seconds, to apply to the manifest's update period. |
- Source:
start(uri, playerInterface) → {Promise<shaka.extern.Manifest>}
Initialize and start the parser. When |start| resolves, it should return
the initial version of the manifest. |start| will only be called once. If
|stop| is called while |start| is pending, |start| should reject.
Parameters:
| Name | Type | Description |
|---|---|---|
uri |
string | The URI of the manifest. |
playerInterface |
shaka.extern.ManifestParser.PlayerInterface | The player interface contains the callbacks and members that the parser can use to communicate with the player and outside world. |
- Implements:
- Source:
Returns:
- Type
- Promise<shaka.extern.Manifest>
stop() → {Promise}
Tell the parser that it must stop and free all internal resources as soon
as possible. Only once all internal resources are stopped and freed will
the promise resolve. Once stopped a parser will not be started again.
The parser should support having |stop| called multiple times and the
promise should always resolve.
- Implements:
- Source:
Returns:
- Type
- Promise
update()
Tells the parser to do a manual manifest update. Implementing this is
optional. This is only called when 'emsg' boxes are present.
- Implements:
- Source:
updatePatchLocationNodes_(patchNodenon-null)
Parameters:
| Name | Type | Description |
|---|---|---|
patchNode |
shaka.extern.xml.Node |
- Source:
verifyRepresentation_(frame) → {boolean}
Verifies that a Representation has exactly one Segment* element. Prints
warnings if there is a problem.
Parameters:
| Name | Type | Description |
|---|---|---|
frame |
shaka.dash.DashParser.InheritanceFrame |
- Source:
Returns:
True if the Representation is usable; otherwise return
false.
- Type
- boolean
Type Definitions
AdaptationInfo
Contains information about an AdaptationSet element.
Type:
- {id: string, contentType: ?string, language: string, main: boolean, streams: !Array<shaka.extern.Stream>, drmInfos: !Array<shaka.extern.DrmInfo>, trickModeFor: ?string, representationIds: !Array<string>, dependencyStreamMap: !Map<string, shaka.extern.Stream>}
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
id |
string | The unique ID of the adaptation set. | |
contentType |
string |
<nullable> |
The content type of the AdaptationSet. |
language |
string | The language of the AdaptationSet. | |
main |
boolean | Whether the AdaptationSet has the 'main' type. | |
streams |
Array<shaka.extern.Stream> | The streams this AdaptationSet contains. | |
drmInfos |
Array<shaka.extern.DrmInfo> | The DRM info for the AdaptationSet. | |
trickModeFor |
string |
<nullable> |
If non-null, this AdaptationInfo represents trick mode tracks. This property is the ID of the normal AdaptationSet these tracks should be associated with. |
representationIds |
Array<string> | An array of the IDs of the Representations this AdaptationSet contains. | |
dependencyStreamMap |
Map<string, string> | A map of dependencyStream |
- Source:
Context
Contains context data for the streams. This is designed to be
shallow-copyable, so the parser must overwrite (not modify) each key as the
parser moves through the manifest and the parsing context changes.
Type:
- {dynamic: boolean, presentationTimeline: !shaka.media.PresentationTimeline, period: ?shaka.dash.DashParser.InheritanceFrame, periodInfo: ?shaka.dash.DashParser.PeriodInfo, adaptationSet: ?shaka.dash.DashParser.InheritanceFrame, representation: ?shaka.dash.DashParser.InheritanceFrame, bandwidth: number, indexRangeWarningGiven: boolean, availabilityTimeOffset: number, mediaPresentationDuration: ?number, profiles: !Array<string>, roles: ?Array<string>, urlParams: function(): string, name: string}
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
dynamic |
boolean | True if the MPD is dynamic (not all segments available at once) | |
presentationTimeline |
shaka.media.PresentationTimeline | The PresentationTimeline. | |
period |
shaka.dash.DashParser.InheritanceFrame |
<nullable> |
The inheritance from the Period element. |
periodInfo |
shaka.dash.DashParser.PeriodInfo |
<nullable> |
The Period info for the current Period. |
adaptationSet |
shaka.dash.DashParser.InheritanceFrame |
<nullable> |
The inheritance from the AdaptationSet element. |
representation |
shaka.dash.DashParser.InheritanceFrame |
<nullable> |
The inheritance from the Representation element. |
bandwidth |
number | The bandwidth of the Representation, or zero if missing. | |
indexRangeWarningGiven |
boolean | True if the warning about SegmentURL@indexRange has been printed. | |
availabilityTimeOffset |
number | The sum of the availabilityTimeOffset values that apply to the element. | |
profiles |
Array<string> | Profiles of DASH are defined to enable interoperability and the signaling of the use of features. | |
mediaPresentationDuration |
number |
<nullable> |
Media presentation duration, or null if unknown. |
urlParams |
function | The query params for the segments. | |
name |
string | The name of the context if this is needed. Eg: clone streams for dependencyStream. |
- Source:
GenerateSegmentIndexFunction
An async function which generates and returns a SegmentIndex.
Type:
- function(): !Promise<shaka.media.SegmentIndex>
- Source:
InheritanceFrame
A collection of elements and properties which are inherited across levels
of a DASH manifest.
Type:
- {segmentBase: ?shaka.extern.xml.Node, segmentList: ?shaka.extern.xml.Node, segmentTemplate: ?shaka.extern.xml.Node, producerReferenceTime: ?shaka.extern.xml.Node, getBaseUris: function(): !Array<string>, width: (number|undefined), height: (number|undefined), contentType: string, mimeType: string, codecs: string, supplementalCodecs: string, frameRate: (number|undefined), pixelAspectRatio: (string|undefined), emsgSchemeIdUris: !Array<string>, id: ?string, originalId: ?string, position: (number|undefined), language: ?string, numChannels: ?number, audioSamplingRate: ?number, availabilityTimeOffset: number, initialization: ?string, aesKey: (shaka.extern.aesKey|undefined), segmentSequenceCadence: number, label: ?string, encrypted: boolean}
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
segmentBase |
shaka.extern.xml.Node |
<nullable> |
The XML node for SegmentBase. |
segmentList |
shaka.extern.xml.Node |
<nullable> |
The XML node for SegmentList. |
segmentTemplate |
shaka.extern.xml.Node |
<nullable> |
The XML node for SegmentTemplate. |
producerReferenceTime |
shaka.extern.xml.Node |
<nullable> |
The XML node for ProducerReferenceTime. |
getBaseUris |
function | Function than returns an array of absolute base URIs for the frame. | |
width |
number | undefined | The inherited width value. | |
height |
number | undefined | The inherited height value. | |
contentType |
string | The inherited media type. | |
mimeType |
string | The inherited MIME type value. | |
codecs |
string | The inherited codecs value. | |
supplementalCodecs |
string | The inherited supplemental codecs value. | |
frameRate |
number | undefined | The inherited framerate value. | |
pixelAspectRatio |
string | undefined | The inherited pixel aspect ratio value. | |
emsgSchemeIdUris |
Array<string> | emsg registered schemeIdUris. | |
id |
string |
<nullable> |
The ID of the element. |
originalId |
string |
<nullable> |
The original ID of the element. |
position |
number | undefined | Position of the element used for indexing in case of no id | |
language |
string |
<nullable> |
The original language of the element. |
numChannels |
number |
<nullable> |
The number of audio channels, or null if unknown. |
audioSamplingRate |
number |
<nullable> |
Specifies the maximum sampling rate of the content, or null if unknown. |
availabilityTimeOffset |
number | Specifies the total availabilityTimeOffset of the segment, or 0 if unknown. | |
initialization |
string |
<nullable> |
Specifies the file where the init segment is located, or null. |
aesKey |
shaka.extern.aesKey | undefined | AES-128 Content protection key | |
segmentSequenceCadence |
number | Specifies the cadence of independent segments in Segment Sequence Representation. | |
label |
string |
<nullable> |
Label or null if unknown. |
encrypted |
boolean | Specifies is encrypted or not. |
- Source:
PatchContext
Type:
- {mpdId: string, type: string, mediaPresentationDuration: ?number, profiles: !Array<string>, availabilityTimeOffset: number, getBaseUris: ?function(): !Array<string>, publishTime: number}
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
mpdId |
string | ID of the original MPD file. | |
type |
string | Specifies the type of the dash manifest i.e. "static" | |
mediaPresentationDuration |
number |
<nullable> |
Media presentation duration, or null if unknown. |
profiles |
Array<string> | Profiles of DASH are defined to enable interoperability and the signaling of the use of features. | |
availabilityTimeOffset |
number | Specifies the total availabilityTimeOffset of the segment. | |
getBaseUris |
function |
<nullable> |
An array of absolute base URIs. |
publishTime |
number | Time when manifest has been published, in seconds. |
- Source:
PeriodInfo
Contains information about a Period element.
Type:
- {start: number, duration: ?number, node: ?shaka.extern.xml.Node, isLastPeriod: boolean}
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
start |
number | The start time of the period. | |
duration |
number |
<nullable> |
The duration of the period; or null if the duration is not given. This will be non-null for all periods except the last. |
node |
shaka.extern.xml.Node |
<nullable> |
The XML Node for the Period. |
isLastPeriod |
boolean | Whether this Period is the last one in the manifest. |
- Source:
RequestSegmentCallback
Type:
- function(!Array<string>, ?number, ?number, boolean): !Promise<BufferSource>
- Source:
StreamInfo
Contains information about a Stream. This is passed from the createStreamInfo
methods.
Type:
- {timeline: number, endTime: number, generateSegmentIndex: shaka.dash.DashParser.GenerateSegmentIndexFunction, timescale: number}
Properties:
| Name | Type | Description |
|---|---|---|
timeline |
number | The continuity timeline, if it has one. |
endTime |
number | The current timeline's end time, if it has one. |
generateSegmentIndex |
shaka.dash.DashParser.GenerateSegmentIndexFunction | An async function to create the SegmentIndex for the stream. |
timescale |
number | The timescale of the stream. |
- Source: