setSubtitle

abstract fun setSubtitle(trackId: String?)

Deprecated

Use `Source.setSubtitleTrack(trackId)` on the currently active source instead e.g. Player.source.setSubtitleTrack(trackId)

Replace with

source?.setSubtitleTrack(trackId)

Enables the SubtitleTrack that corresponds to the trackId. A list of currently available SubtitleTracks can be retrieved via availableSubtitles. Providing null as the trackId disables subtitles.

Has no effect if there is no active playback session.

This function is deprecated. Use Source.setSubtitleTrack on the currently active source instead e.g. Player.source.setSubtitleTrack