Constructor
new ManifestParserUtils()
Utility functions for manifest parsing.
- Source:
Members
AUDIO_CODEC_REGEXPS_ :Array.<!RegExp>
A list of regexps to detect well-known audio codecs.
Type:
- Array.<!RegExp>
CODEC_REGEXPS_BY_CONTENT_TYPE_ :Object.<string, !Array.<!RegExp>>
Type:
- Object.<string, !Array.<!RegExp>>
ContentType :string
Type:
- string
Properties:
Name | Value | Type | Description |
---|---|---|---|
VIDEO |
video | string | |
AUDIO |
audio | string | |
TEXT |
text | string | |
IMAGE |
image | string | |
APPLICATION |
application | string |
GAP_OVERLAP_TOLERANCE_SECONDS :number
Specifies how tolerant the player is of 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
TEXT_CODEC_REGEXPS_ :Array.<!RegExp>
A list of regexps to detect well-known text codecs.
Type:
- Array.<!RegExp>
TextStreamKind :string
Type:
- string
Properties:
Name | Value | Type | Description |
---|---|---|---|
SUBTITLE |
subtitle | string | |
CLOSED_CAPTION |
caption | string |
VIDEO_CODEC_REGEXPS_ :Array.<!RegExp>
A list of regexps to detect well-known video codecs.
Type:
- Array.<!RegExp>
Methods
createDrmInfo(keySystem, initData) → {shaka.extern.DrmInfo}
Creates a DrmInfo object from the given info.
Parameters:
Name | Type | Description |
---|---|---|
keySystem |
string | |
initData |
Array.<shaka.extern.InitDataOverride> |
- Source:
Returns:
- Type
- shaka.extern.DrmInfo
guessCodecs(contentType, codecsnon-null) → {string}
Attempts to guess which codecs from the codecs list belong to a given
content type.
Assumes that at least one codec is correct, and throws if none are.
Parameters:
Name | Type | Description |
---|---|---|
contentType |
string | |
codecs |
Array.<string> |
- Source:
Returns:
- Type
- string
guessCodecsSafe(contentType, codecsnon-null) → {string}
Attempts to guess which codecs from the codecs list belong to a given
content type. Does not assume a single codec is anything special, and does
not throw if it fails to match.
Parameters:
Name | Type | Description |
---|---|---|
contentType |
string | |
codecs |
Array.<string> |
Returns:
or null if no match is found
- Type
- string
resolveUris(baseUrisnon-null, relativeUrisnon-null) → {Array.<string>}
Resolves an array of relative URIs to the given base URIs. This will result
in M*N number of URIs.
Note: This method is slow in SmartTVs and Consoles. It should only be
called when necessary.
Parameters:
Name | Type | Description |
---|---|---|
baseUris |
Array.<string> | |
relativeUris |
Array.<string> |
- Source:
Returns:
- Type
- Array.<string>