SubtitleTrackState

State holder for subtitle tracks, such as SubtitleTrackList or SubtitleMenu.

Create an instance with rememberSubtitleTrackState.

Properties

Link copied to clipboard
var activeSubtitleTrack: TextTrack?

The currently shown subtitle track, if any.

Link copied to clipboard
var subtitleTracks: List<TextTrack>

The available subtitle tracks.

Functions

Link copied to clipboard
fun select(track: TextTrack?)

Selects the subtitle track to show, or null to hide all subtitles. All other subtitle tracks are disabled; non-subtitle text tracks are not touched.