A TextEngine plugin that parses WebVTT files.
Parameters:
Name | Type | Description |
---|---|---|
data |
ArrayBuffer | ArrayBufferView |
- Source:
Throws:
Returns:
- Type
- Array.<!TextTrackCue>
Methods
-
(private, static) parseCue_(textnon-null) → (nullable) {TextTrackCue}
-
Parses a text block into a Cue object.
Parameters:
Name Type Description text
Array.<string> - Source:
Returns:
- Type
- TextTrackCue
-
(private, static) parseSetting_(cuenon-null, word) → {boolean}
-
Parses a WebVTT setting from the given word.
Parameters:
Name Type Description cue
VTTCue word
string - Source:
Returns:
True on success.- Type
- boolean
-
(private, static) parseTime_(parsernon-null) → (nullable) {number}
-
Parses a WebVTT time from the given parser.
Parameters:
Name Type Description parser
shaka.util.TextParser - Source:
Returns:
- Type
- number