Loads WebVTT cues from a URI, streaming them by playhead position.
Two URI shapes are accepted:
Direct .vtt document: fetched once and delivered via onCues.
HLS media playlist (.m3u8): the playlist is parsed, then segments
whose time range overlaps the buffer window around getCurrentTime()
are fetched (closest to the playhead first), one at a time. Each
segment's cues are delivered via onCues as it is parsed.
Cue start/end times are expected to already be on the presentation
timeline (Shaka packager's default WebVTT output), so segments are joined
without offset.
The returned promise resolves once every segment has been fetched, or the
abort signal fires. Fetch failures reject the promise.
Loads WebVTT cues from a URI, streaming them by playhead position.
Two URI shapes are accepted:
.vttdocument: fetched once and delivered viaonCues..m3u8): the playlist is parsed, then segments whose time range overlaps the buffer window aroundgetCurrentTime()are fetched (closest to the playhead first), one at a time. Each segment's cues are delivered viaonCuesas it is parsed.Cue start/end times are expected to already be on the presentation timeline (Shaka packager's default WebVTT output), so segments are joined without offset.
The returned promise resolves once every segment has been fetched, or the abort signal fires. Fetch failures reject the promise.