Multi-language captions
accessibilityWebVTT captions in two languages with a captions menu and styled cues.
Caption track
Caption size
Captions render in an overlay the skin controls, so they move above the control bar and follow your design tokens. Press C to toggle them from the keyboard.
The code
tsxcreatePlayer('#player', {src: 'movie.mp4',tracks: [{ src: '/captions.en.vtt', label: 'English', srclang: 'en', default: true },{ src: '/captions.es.vtt', label: 'Español', srclang: 'es' },],tokens: { 'cue-size': '1.25' }, // scale caption textskin: minimal(),});player.setTextTrack(1); // show Spanish, -1 turns captions off