Skip to main content

## player_set_subtitle_track

# Function player_set_subtitle_track

Source

    pub async fn player_set_subtitle_track(
        player: State<'_, PlayerStateWrapper>,
        stream_index: Option<i32>,
    ) -> Result<PlayerStatus, String>

Expand description

Set (or clear, with `None`) the active subtitle track on a native backend.

On Android this indexes ExoPlayer’s text track groups — i.e. the position of the sideloaded `MediaItem.SubtitleConfiguration`, not the Jellyfin stream index. The HTML5 path never reaches here; it toggles its own `<track>` children. libmpv implements neither, leaving the trait default in place.

TRACES: UR-020 | IR-018, DR-023