Skip to content

Add playback quality controls to Apple TV#119

Open
Veeit wants to merge 9 commits into
milika:masterfrom
Veeit:AppleTV-Quality-Controlls
Open

Add playback quality controls to Apple TV#119
Veeit wants to merge 9 commits into
milika:masterfrom
Veeit:AppleTV-Quality-Controlls

Conversation

@Veeit

@Veeit Veeit commented Jul 2, 2026

Copy link
Copy Markdown

Adds per-video playback quality selection on tvOS and makes the Settings quality preference behave as a true default rather than a value the player silently overwrites. Also fixes a couple of tvOS UI issues found along the way.

Previously, the quality picker overlay existed and was fully wired for the Siri Remote, but nothing on tvOS ever opened it — the iOS quick-access pill row is #if !os(tvOS) and the …-menu had no quality entry. On top of that, picking a quality (on any platform) permanently overwrote the global preferredQuality setting.

What changed

  • Per-video quality is now temporary on all platforms. Picking a quality in the player's picker affects only the current video; the next video starts at the Settings default. The picker no longer writes AppSettings.preferredQuality. Reset-on-next-video already happens via PlaybackQualityManager.reset().
  • New perVideoQuality / effectiveQuality model in PlaybackQualityManager. perVideoQuality records the user's pick for the current video and survives CDN-failure reverts of selectedFormat; effectiveQuality resolves pick-else-default. Mid-playback 403/recovery paths in PlaybackViewModel+Fallback now read effectiveQuality, so an error recovery no longer snaps playback back to the Settings default after a manual pick.
  • New "Quality" row in the tvOS …-menu, directly below Playback Speed, showing the current quality and opening the existing quality picker. Hidden while no formats are available (audio-only / not yet loaded).
  • Settings label renamed "Max Resolution" → "Default Quality" to match its new role (translations preserved, marked needs_review).
  • Fix: white Cancel buttons. The Cancel buttons in all five picker sheets (quality, speed, sleep timer, captions, audio track) used the default tvOS button style, rendering as a bright white lozenge on the dark sheet. A new PickerHeaderButtonStyle gives them a flat look with the same gray focus highlight as the menu rows. iOS/macOS appearance unchanged.
  • Fix: Stats for Nerds menu row highlighted when Cancel was focused (copy-paste bug) and had no focus binding of its own, making it unreachable with the remote. Now has its own .statsForNerds focus case. Also removed the dead moreMenuVisibleRows property.

Veeit and others added 9 commits July 2, 2026 20:41
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
perVideoQuality records the user's pick for the current video (survives
CDN-failure reverts of selectedFormat, cleared on reset()); effectiveQuality
resolves pick-else-default for recovery paths.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
attemptURL's variant selection and ABR hints now read effectiveQuality so a
mid-playback 403 recovery keeps the user's per-video choice instead of
snapping back to the Settings default.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Picking a quality in the player no longer writes AppSettings.preferredQuality;
the Settings value is now a true default applied to each new video.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Opens the existing qualityPickerOverlay (already focus-wired for tvOS).
Also fixes the Stats for Nerds row highlighting when Cancel was focused and
removes the dead moreMenuVisibleRows property. UI test added; running it
locally is currently blocked by the pre-existing Crashlytics run-script
phase failure (missing gitignored GoogleService-Info.plist) — app code
compiles and links for tvOS.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Default tvOS button style rendered a bright white platter on the dark sheet.
PickerHeaderButtonStyle shows a gray focus highlight instead, matching the
more-menu rows. iOS/macOS unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Per-video picks are temporary now, so the Settings value is a true default
rather than a sticky max resolution. Existing translations kept but marked
needs_review since the label's meaning shifted.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Veeit Veeit changed the title Apple tv quality controlls Add playback quality controls to Apple TV Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant