Converts an SRT-formatted string to a WebVTT-formatted string.
| Name | Type | Description |
|---|---|---|
data |
string |
The SRT input data. |
- License
- MIT
- See
- https://github.com/silviapfeiffer/silviapfeiffer.github.io/blob/master/index.html
- Returns
-
A WebVTT-formatted string.
- Type string
- Source
- srtParser.js, line 10
Methods
private, static convertSrtCue(caption) → string
Converts a single SRT cue entry to a WebVTT cue entry.
| Name | Type | Description |
|---|---|---|
caption |
string |
The SRT cue text (including timecode and content). |
- Returns
-
A WebVTT cue string, or an empty string if parsing fails.
- Type string
- Source
- srtParser.js, line 33