Constructor
new SegmentUtils()
Utility functions for segment parsing.
- Source:
Methods
chooseBetterCodecs_(codecsnon-null) → {Array.<string>}
Prioritizes Dolby Vision if supported. This is necessary because with
Dolby Vision we could have hvcC and dvcC boxes at the same time.
Parameters:
Name | Type | Description |
---|---|---|
codecs |
Array.<string> |
- Source:
Returns:
codecs
- Type
- Array.<string>
codecsFiltering(codecsnon-null) → {Array.<string>}
Parameters:
Name | Type | Description |
---|---|---|
codecs |
Array.<string> |
- Source:
Returns:
codecs
- Type
- Array.<string>
filterDuplicateCodecs_(codecsnon-null) → {Array.<string>}
Parameters:
Name | Type | Description |
---|---|---|
codecs |
Array.<string> |
- Source:
Returns:
codecs
- Type
- Array.<string>
getBasicInfoFromMimeType(mimeType) → {shaka.media.SegmentUtils.BasicInfo}
Parameters:
Name | Type | Description |
---|---|---|
mimeType |
string |
- Source:
Returns:
getBasicInfoFromMp4(initDatanullable, datanon-null) → {shaka.media.SegmentUtils.BasicInfo}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
initData |
BufferSource |
<nullable> |
|
data |
BufferSource |
- Source:
Returns:
getBasicInfoFromTs(datanon-null) → {shaka.media.SegmentUtils.BasicInfo}
Parameters:
Name | Type | Description |
---|---|---|
data |
BufferSource |
- Source:
Returns:
getDefaultKID(datanon-null) → {string}
Parameters:
Name | Type | Description |
---|---|---|
data |
BufferSource |
- Source:
Returns:
- Type
- string
Type Definitions
BasicInfo
Type:
- {type: string, mimeType: string, codecs: string, language: ?string, height: ?string, width: ?string, channelCount: ?number, sampleRate: ?number, closedCaptions: Map.<string, string>, videoRange: ?string, colorGamut: ?string}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
type |
string | ||
mimeType |
string | ||
codecs |
string | ||
language |
string |
<nullable> |
|
height |
string |
<nullable> |
|
width |
string |
<nullable> |
|
channelCount |
number |
<nullable> |
|
sampleRate |
number |
<nullable> |
|
closedCaptions |
Map.<string, string> | ||
videoRange |
string |
<nullable> |
|
colorGamut |
string |
<nullable> |
- Source: