TextTrack
Represents a text track (subtitle or caption track) available in the video.Properties
Unique identifier for the text track.
Display label for the text track. This is typically shown to users when selecting subtitles.
ISO 639-1 or ISO 639-2 language code identifying the track’s language.
Whether this text track is currently selected/active.
Usage
Text tracks are typically retrieved from the video player and used to display available subtitle/caption options to the user.Getting Available Text Tracks
Selecting a Text Track
Building a Track Selector UI
Disabling Text Tracks
Examples
Example Text Track Objects
Filtering Tracks by Language
Platform Behavior
iOS/visionOS/tvOS
- Text tracks are automatically detected from HLS manifests
- Native subtitle rendering is used
- Labels may be overridden by the system player
Android
- Supports embedded tracks in videos
- External subtitle files loaded via
externalSubtitlesin VideoConfig - Custom subtitle rendering
Related Types
- VideoConfig - Configuration for external subtitles via
externalSubtitles - ExternalSubtitle - Type for adding external subtitle files