Constructor
new Mp4VttParser()
- Implements:
- Source:
Members
(private, nullable) timescale_ :number
The current time scale used by the VTT parser.
Type:
- Source:
Methods
(private, static) assembleCue_(payload, idnullable, settingsnullable, startTime, endTime) → (non-null) {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
(private, static) parseTFHD_(flags, readernon-null) → (nullable) {number}
Parameters:
- Source:
Returns:
The default_sample_duration field, if present.
-
Type
-
number
(private, static) 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
(export) 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:
Parse a media segment and return the cues that make up the segment.
Parameters:
Name |
Type |
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. |
- Implements:
- Source:
Returns:
-
Type
-
Array.<!shaka.extern.Cue>
Type Definitions
TimeSegment
Type:
-
{duration: ?number, sampleSize: ?number, timeOffset: ?number}
Properties:
Name |
Type |
Attributes |
Description |
duration |
number
|
<nullable>
|
The length of the segment in timescale units. |
sampleSize |
number
|
<nullable>
|
The size of the segment in bytes. |
timeOffset |
number
|
<nullable>
|
The time since the start of the segment in timescale units. Time
offset is based of the start of the segment. If this value is
missing, the accumated durations preceeding this time segment will
be used to create the start time. |
- Source: