Side-loaded text tracks
***********************
Code samples:
* WebVTT and TTML subtitles
(https://raw.githubusercontent.com/castlabs/prestoplay-web-code-samples/refs/heads/main/examples/subtitles/sidecar.js):
side-loads a WebVTT or TTML file for a DASH or HLS stream.
Use "config.remoteTextTracks" to add side-loaded ("sidecar") subtitle
files that aren't present in the manifest. Each entry follows
"RemoteTextTrack"
(https://players.castlabs.com/web/latest/docs/api/clpp.RemoteTextTrack.md),
and "mimeType" must match a format whose module is imported, for
example "text/vtt" or "text/srt" with the VTT module.
Note:
With MSE playback, side-loaded text tracks are only supported for
video on demand (VOD). Adding them to a live stream fails with the
"CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM" error.