Constructor
new Mp4VttParser()
- Implements:
- Source:
Members
timescale_ :number
The current time scale used by the VTT parser.
Type:
- number
- Source:
Methods
assembleCue_(payload, idnullable, settingsnullable, startTime, endTime) → {shaka.text.Cue}
Take the individual components that make a cue and create a vttc cue.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
payload |
string | ||
id |
string |
<nullable> |
|
settings |
string |
<nullable> |
|
startTime |
number | ||
endTime |
number |
- Source:
Returns:
- Type
- shaka.text.Cue
parseVTTC_(datanon-null, startTime, endTime) → {shaka.text.Cue}
Parses a vttc box into a cue.
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Uint8Array | |
startTime |
number | |
endTime |
number |
- Source:
Returns:
- Type
- shaka.text.Cue
parseFragment_(rawPayloadnon-null, presentationsnon-null, baseTime, defaultDurationnullable, time, cuesnon-null)
Reads the cues of one fragment: the samples its trun describes, from the
mdat that follows it.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
rawPayload |
Uint8Array | ||
presentations |
Array<shaka.util.ParsedTRUNSample> | ||
baseTime |
number | in timescale units, from the tfdt | |
defaultDuration |
number |
<nullable> |
in timescale units, from the tfhd |
time |
shaka.extern.TextParser.TimeContext | ||
cues |
Array<shaka.text.Cue> | to add the cues to |
- Source:
parseInit(datanon-null)
Parse an initialization segment. Some formats do not have init
segments so this won't always be called.
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Uint8Array | The data that makes up the init segment. |
- Implements:
- Source:
parseMedia(datanon-null, timeContext, urinullable, imagesnon-null) → {Array<!shaka.text.Cue>}
Parse a media segment and return the cues that make up the segment.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
data |
Uint8Array | The next section of buffer. | |
timeContext |
shaka.extern.TextParser.TimeContext | The time information that should be used to adjust the times values for each cue. | |
uri |
string | undefined |
<nullable> |
The media uri. |
images |
Array<string> |
- Implements:
- Source:
Returns:
- Type
- Array<!shaka.text.Cue>
setManifestType(manifestType)
Notifies the manifest type.
Parameters:
| Name | Type | Description |
|---|---|---|
manifestType |
string |
- Implements:
- Source: