Feature

Track Selection UI Added to Video Player

TL;DR Snapshot

Stream Probe now includes a track selection UI so you can switch between audio languages, video quality levels, and subtitle tracks from inside the player. A new TrackSelectionSheet component and TrackOption data model handle the display and state. No extra setup required if your stream already exposes multiple tracks.

Share this update

Stream Probe introduces a track selection sheet in this update, letting you switch audio tracks, video qualities, and subtitle tracks directly from the player interface.

TL;DR

A new TrackSelectionSheet component is now part of the player UI. You can pick your preferred audio language, video quality level, or subtitle track without writing any extra code or digging through debug logs.

What's New

  • Added TrackSelectionSheet: a bottom sheet UI component that lists available audio, video, and subtitle tracks
  • Added TrackOption data model to represent each selectable track with its metadata
  • Updated PlayerViewModel to manage track selection state and handle track switching logic
  • Updated PlayerUiState to expose available tracks and the currently selected track per type
  • Integrated track selection controls into PlayerController and PlayerScreen

How to Use

The track selection sheet appears automatically when track data is available from the player. Tap the track selector button in the player controls to open the sheet. Available audio, video, and subtitle tracks are grouped by type. Tap any track option to switch to it immediately.

// TrackOption represents each selectable track
struct TrackOption {
    let id: String
    let label: String
    let type: TrackType // .audio, .video, .subtitle
    let isSelected: Bool
}

FAQ

Does this require any changes to how I set up Stream Probe?

No. If your stream exposes multiple tracks, they will appear automatically in the selection sheet. No additional setup is needed.

Which track types are supported?

Audio tracks (language switching), video tracks (quality levels), and subtitle tracks are all supported in this release.

Where does the track data come from?

Track data is sourced from the same PlayerInterceptor pipeline already used by Stream Probe. The AudioTrackInfo and SubtitleTrackInfo models introduced previously feed directly into the new selection UI.

Can I see which track is currently active?

Yes. The PlayerUiState marks the currently selected track for each type, and the sheet visually highlights the active selection.