Manages subtitles, captions, chapters, and thumbnail tracks. Required byDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/videojs/v10/llms.txt
Use this file to discover all available pages before exploring further.
CaptionsButton.
Import
Usage
- React
- HTML
State
All text tracks attached to the media element.
Whether captions or subtitles are currently enabled.
Cues from the first chapters track, used for chapter navigation.
Cues from the first thumbnails track, used for seek previews.
The
src attribute of the thumbnail track, used to resolve relative thumbnail URLs.Actions
Toggle subtitle and caption visibility. Pass
true to force show, false to force hide. Returns the new state.Selector
UseselectTextTrack to subscribe to only the text track slice of state. Returns undefined if the textTrack feature is not configured.
- React
- HTML
Required by:
CaptionsButton, Thumbnail