Class: shaka.media.SegmentUtils
Utility functions for segment parsing.
Constructor
new SegmentUtils()
Utility functions for segment parsing.
- Source:
Methods
aesDecrypt(rawResultnon-null, aesKey, position) → {Promise<!BufferSource>}
Parameters:
- Source:
Returns:
-
Type
-
Promise<!BufferSource>
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>
getBasicInfoFromMp4(initDatanullable, datanullable, disableText) → {shaka.extern.BasicInfo}
Parameters:
| Name |
Type |
Attributes |
Description |
initData |
BufferSource
|
<nullable>
|
|
data |
BufferSource
|
<nullable>
|
|
disableText |
boolean
|
|
|
- Source:
Returns:
-
Type
-
shaka.extern.BasicInfo
getBasicInfoFromTs(datanon-null, disableAudio, disableVideo, disableText) → {shaka.extern.BasicInfo}
Parameters:
| Name |
Type |
Description |
data |
BufferSource
|
|
disableAudio |
boolean
|
|
disableVideo |
boolean
|
|
disableText |
boolean
|
|
- Source:
Returns:
-
Type
-
shaka.extern.BasicInfo
getDefaultKID(datanon-null) → {string}
Parameters:
| Name |
Type |
Description |
data |
BufferSource
|
|
- Source:
Returns:
-
Type
-
string
getStartTimeAndDurationFromMp4(datanon-null, timescale) → {{startTime: number, duration: number}}
Parameters:
| Name |
Type |
Description |
data |
BufferSource
|
|
timescale |
number
|
|
- Source:
Returns:
-
Type
-
{startTime: number, duration: number}