Implements a forgiving subset of the WebVTT 1.0 specification: header
detection, comment blocks (lines starting with NOTE), styling/region
blocks (STYLE bodies are captured, REGION skipped), cue identifiers, and
HH:MM:SS.mmm or MM:SS.mmm timestamps with optional cue settings.
Parameters
input: string
The raw WebVTT document text. Both LF and CRLF line endings
are supported, and a leading BOM is stripped if present.
Parses a WebVTT document into a list of cues.
Implements a forgiving subset of the WebVTT 1.0 specification: header detection, comment blocks (lines starting with
NOTE), styling/region blocks (STYLE bodies are captured, REGION skipped), cue identifiers, and HH:MM:SS.mmm or MM:SS.mmm timestamps with optional cue settings.