Extracts a VTT segment from an MP4 file and maps it to cue objects.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
data |
ArrayBuffer | ||
offset |
number | ||
segmentStartTime |
number |
<nullable> |
|
segmentEndTime |
number |
<nullable> |
|
useRelativeCueTimestamps |
boolean | Only used by the VTT parser |
- Source:
Returns:
- Type
- Array.<!TextTrackCue>
Members
-
(static, constant) BOX_TYPE_IDEN :number
-
Type:
- number
- Source:
-
(static, constant) BOX_TYPE_PAYL :number
-
Type:
- number
- Source:
-
(static, constant) BOX_TYPE_STTG :number
-
Type:
- number
- Source:
-
(static, constant) BOX_TYPE_VTTC :number
-
Type:
- number
- Source:
-
(static, constant) BOX_TYPE_WVTT :number
-
Type:
- number
- Source:
Methods
-
(private, static) parseCue_(data, segmentStartTime, segmentEndTime) → {TextTrackCue}
-
Parses a vttc box into a cue.
Parameters:
Name Type Description data
ArrayBuffer segmentStartTime
number segmentEndTime
number - Source:
Returns:
- Type
- TextTrackCue
-
(private, static) parseData_(data, offset, segmentStartTime, segmentEndTime) → (non-null) {Array.<!TextTrackCue>}
-
Parses the content of the mdat MP4 box into cue objects.
Parameters:
Name Type Description data
ArrayBuffer offset
number segmentStartTime
number segmentEndTime
number - Source:
Returns:
- Type
- Array.<!TextTrackCue>