Subtitles¶
PRESTOplay for Web Apps has rich support for text tracks. Multiple parsers cover a wide range of subtitle and caption formats, and a choice of displayers lets you match the styling and rendering behavior your application needs.
To render cues, install a text displayer. The HTML text displayer
(HtmlTextDisplayer) is recommended: it handles complex layouts and
styling, and keeps rendering consistent across platforms.
import "@castlabs/prestoplay/cl.htmlcue";
Without the HTML Cue module, the player falls back to the native text displayer based on the capabilities of the browser, which may have varying levels of support for more complex styling and layouts.
Each topic has its own page:
CEA-608 captions¶
PRESTOplay for Web Apps supports CEA-608 captions, the legacy closed-captioning
standard embedded directly in the video signal. The caption parser requires
mux.js (version 5.7.0 or later) available in the global scope:
import * as muxjs from "mux.js";
window.muxjs = muxjs;
See Components for the full mux.js installation steps.