Repository navigation
iOS player controls & menus redesign - #46
Conversation
Rebuild the touch player UI around native iOS idioms while keeping the Liquid Glass material language. tvOS and macOS behavior is unchanged (shared sheets keep their legacy layouts behind platform guards). Overlay (MobilePlayerControls): - Top strip reduced to Close + AirPlay (new AVRoutePickerView wrapper), with a two-line title block (series · S:E eyebrow over episode title) anchored top-leading instead of a truncating center title - Thumbless capsule scrubber: 8pt at rest, 14pt while scrubbing, buffered range (from bufferedAheadSeconds), intro tint, chapter ticks, and a floating time + chapter preview bubble; other controls recede during a scrub - Labeled action row (Speed / Audio & Subtitles / Chapters / Lock / More) with a three-tier ViewThatFits fallback so portrait never overflows - Speed quick menu on the pill itself (prominent glass when not 1x); the speed picker leaves the iOS settings sheet - Sleep timer surfaces as a status chip; trailing time label toggles remaining vs duration; intro auto-skip merges into one pill with an inline countdown and a cancel circle Gestures (new MobilePlayerGestureLayer between surface and overlay): - Double-tap edges ±10s with ripple flash, center double-tap play/pause - Touch-and-hold for 2x while held (new non-persisting beginHoldFastForward on the view model) - Edge drags adjust brightness (left) and player volume (right) with slim gauges; center swipe-down dismisses; pinch-for-aspect moves in from the surface Sheets: - Track rows gain metadata pills (PlayerTrack.attributePillLabels) plus a nav header and Done button; chapters get the same header treatment - iOS settings become a hierarchy: Video (Quality sub-page, Aspect, HDR), Audio, Subtitles (Appearance sub-page with live preview, delay), Session; route diagnostics demoted to an Advanced sub-page Design spec with mockups lives at docs/ios-player-redesign/mockups.html (untracked; docs/* is gitignored). Co-Authored-By: Claude Fable 5 <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR moves iOS player gestures into a dedicated overlay layer, redesigns the mobile controls UI, updates playback state handling, refactors track metadata labels, and wraps player sheets in navigation stacks with shared settings helpers. ChangesiOS Player UI and Gesture Rework
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant MobilePlayerGestureLayer
participant PlayerViewModel
participant UIScreen
User->>MobilePlayerGestureLayer: single tap
MobilePlayerGestureLayer->>MobilePlayerGestureLayer: toggle controls
User->>MobilePlayerGestureLayer: double tap left/right
MobilePlayerGestureLayer->>PlayerViewModel: skip ±10s
MobilePlayerGestureLayer->>MobilePlayerGestureLayer: showSkipFlash
User->>MobilePlayerGestureLayer: long press
MobilePlayerGestureLayer->>PlayerViewModel: beginHoldFastForward(rate)
User->>MobilePlayerGestureLayer: release
MobilePlayerGestureLayer->>PlayerViewModel: endHoldFastForward()
User->>MobilePlayerGestureLayer: edge drag (left)
MobilePlayerGestureLayer->>UIScreen: adjust brightness
User->>MobilePlayerGestureLayer: edge drag (right)
MobilePlayerGestureLayer->>PlayerViewModel: adjust userVolume
User->>MobilePlayerGestureLayer: pinch
MobilePlayerGestureLayer->>MobilePlayerGestureLayer: cycle videoGravity
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e2a190bc8b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| viewModel.skipBackward(10) | ||
| showSkipFlash(forward: false) | ||
| } else if x > size.width * (1 - Self.skipZoneFraction) { | ||
| viewModel.skipForward(10) |
There was a problem hiding this comment.
Keep double-tap skips from revealing controls
When the clean video view is double-tapped at either edge, these calls go through skipBackward/skipForward, and those methods call scheduleHideControls(), setting showControls = true. Because PlayerView places MobilePlayerControls above this gesture layer, the full-screen scrim is shown after the first skip, so subsequent double-taps hit the scrim instead of this handler and the new repeated double-tap skip gesture stops working; the flash is also rendered under the overlay. Use a skip path that does not reveal controls for this gesture, or keep the gesture active over the scrim.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in c992dd8 — confirmed real: skipForward/skipBackward unconditionally called scheduleHideControls(), which force-shows the overlay. Both methods now take revealingControls (default true, so tvOS and the overlay buttons are unchanged) and the double-tap gesture passes false, keeping the scrim down, the flash visible, and repeated double-taps landing on the gesture layer.
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
iosApp/iosApp/Screens/Player/iOS/MobilePlayerControls.swift (1)
277-336: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winMake the custom scrubber VoiceOver-adjustable.
The capsule scrubber is drag-only right now, so VoiceOver users cannot seek. Add an accessibility label/value and an adjustable action that calls the same scrub path.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@iosApp/iosApp/Screens/Player/iOS/MobilePlayerControls.swift` around lines 277 - 336, The custom scrubber in progressSlider is drag-only and lacks VoiceOver seek support. Add accessibility metadata to the scrubber container in MobilePlayerControls.progressSlider, including a clear label and value based on the current playback position, and attach an adjustable action so VoiceOver can increment/decrement seeking. Reuse the existing scrub path by routing the accessibility action through the same beginScrub/updateScrub/endScrub flow already used by the DragGesture and viewModel.
🧹 Nitpick comments (1)
iosApp/iosApp/Screens/Player/PlayerTrack.swift (1)
61-106: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winGood extraction; consider reusing it in
displayLabeltoo.
attributeParts()/attributesLabel/attributePillLabelsare correct — join/empty-check behavior is preserved and the array export is a clean addition. However,displayLabel(lines 108-147) rebuilds almost the identical list (title, language, channel layout, codec, isDefault/isForced/isHearingImpaired/isExternal) by hand. Since this PR just introduced the shared builder, it's a good moment to havedisplayLabelprependnormalizedTitletoattributeParts()(only casing of "default"/"forced" differs) instead of duplicating the branches.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@iosApp/iosApp/Screens/Player/PlayerTrack.swift` around lines 61 - 106, `displayLabel` is still duplicating the same title/language/channel/codec/flag assembly logic that `attributeParts()` now centralizes. Update `displayLabel` in `PlayerTrack` to build on `attributeParts()` instead of manually repeating the branches, prepending `normalizedTitle` and only handling the small casing difference for default/forced as needed. Keep `attributesLabel` and `attributePillLabels` as-is, and reuse the shared helper so the label logic stays consistent in one place.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@iosApp/iosApp/Screens/Player/iOS/MobilePlayerControls.swift`:
- Around line 168-203: The center transport buttons in
MobilePlayerControls.centerCluster are image-only and need explicit
accessibility labels. Add labels to the three Button elements for skip backward,
play/pause, and skip forward so they don’t rely on SF Symbol names; use clear
text like “Skip Back 10 Seconds”, a dynamic play/pause label based on
viewModel.isPlaying, and “Skip Forward 10 Seconds”. Keep the labels attached to
the existing Button actions and buttonStyle modifiers.
In `@iosApp/iosApp/Screens/Player/iOS/MobilePlayerGestureLayer.swift`:
- Around line 70-84: The long-press cleanup in MobilePlayerGestureLayer is only
handled via onPressingChanged, so if the view disappears while hold-fast-forward
is active the temporary rate can remain stuck. Update the gesture layer itself
by adding onDisappear alongside the existing onLongPressGesture in
MobilePlayerGestureLayer so it always calls viewModel.endHoldFastForward() when
the layer is removed, and make sure any transient hold-related task/state is
canceled there as well.
In `@iosApp/iosApp/Screens/Player/PlayerViewModel.swift`:
- Around line 2373-2377: The endHoldFastForward flow in PlayerViewModel is
restoring the playback speed unconditionally, which can resume a paused
AVPlayer. Update endHoldFastForward so it always clears isHoldFastForwarding,
but only calls activePlayer.setSpeed(settings.playbackSpeed) when the player is
still playing; otherwise leave playback paused and do not restore the rate.
---
Outside diff comments:
In `@iosApp/iosApp/Screens/Player/iOS/MobilePlayerControls.swift`:
- Around line 277-336: The custom scrubber in progressSlider is drag-only and
lacks VoiceOver seek support. Add accessibility metadata to the scrubber
container in MobilePlayerControls.progressSlider, including a clear label and
value based on the current playback position, and attach an adjustable action so
VoiceOver can increment/decrement seeking. Reuse the existing scrub path by
routing the accessibility action through the same
beginScrub/updateScrub/endScrub flow already used by the DragGesture and
viewModel.
---
Nitpick comments:
In `@iosApp/iosApp/Screens/Player/PlayerTrack.swift`:
- Around line 61-106: `displayLabel` is still duplicating the same
title/language/channel/codec/flag assembly logic that `attributeParts()` now
centralizes. Update `displayLabel` in `PlayerTrack` to build on
`attributeParts()` instead of manually repeating the branches, prepending
`normalizedTitle` and only handling the small casing difference for
default/forced as needed. Keep `attributesLabel` and `attributePillLabels`
as-is, and reuse the shared helper so the label logic stays consistent in one
place.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: c17c2f1a-b517-41da-85fc-e27e572ec9c9
📒 Files selected for processing (9)
iosApp/iosApp/Screens/Player/PlayerTrack.swiftiosApp/iosApp/Screens/Player/PlayerView.swiftiosApp/iosApp/Screens/Player/PlayerViewModel.swiftiosApp/iosApp/Screens/Player/Sheets/ChapterSheet.swiftiosApp/iosApp/Screens/Player/Sheets/PlayerSettingsSheet.swiftiosApp/iosApp/Screens/Player/Sheets/TrackSelectionSheet.swiftiosApp/iosApp/Screens/Player/iOS/AirPlayRoutePicker.swiftiosApp/iosApp/Screens/Player/iOS/MobilePlayerControls.swiftiosApp/iosApp/Screens/Player/iOS/MobilePlayerGestureLayer.swift
Sim-driven visual polish:
- Shrink the overlay a step: smaller title block, 40pt top circles,
34pt action pills, caption2 time labels, 6pt scrubber (12pt scrubbing)
- Center cluster: fixed-size circles (50pt skips, 64pt play/pause) so the
family stays proportioned; play/pause is white prominent glass with a
dark glyph instead of accent blue
- Tighten bottom padding so the scrubber and action row hug the screen edge
- Remove the AirPlay button: external playback is deliberately disabled on
every route (keepsExternalPlaybackDisabledUntilValidated) and the
CoreMedia pipeline can't AirPlay video, so the affordance was a lie
- Skip Intro pill matches the white-glass family and drops to 24pt above
the bottom edge when the controls are hidden
- Track sheet: rows use .plain button style so names render label-colored
(borderless List buttons tinted every row blue), middle-truncate long
sidecar names
- Subtitle rows lead with the language; junk embedded titles (format
names, codec/language repeats) are dropped and meaningful ones
("Dub (SDH)") demote to secondary text; language pill removed as
redundant. Shared row builder, so tvOS gets the same treatment.
PR review fixes (Codex + CodeRabbit):
- Double-tap skip no longer summons the controls overlay: skipForward/
skipBackward gain revealingControls (default true, tvOS unchanged); the
gesture layer passes false so its flash stays visible and repeated
double-taps keep landing on the gesture layer instead of the scrim
- Gesture layer ends hold-fast-forward and cancels transient tasks in
onDisappear (layer can be torn out mid-press)
- Accessibility labels on the center transport buttons; the custom
scrubber is now a VoiceOver-adjustable element seeking ±10s
- Correct the stale beginHoldFastForward comment: backends never start a
paused clock on setSpeed, and endHoldFastForward intentionally restores
the rate unconditionally so defaultRate can't stick at 2×
Co-Authored-By: Claude Fable 5 <[email protected]>
|
Addressed the review feedback in c992dd8:
Also includes a sim-driven visual polish pass (smaller control sizing, white-glass play/pause + Skip Intro, tighter bottom padding, AirPlay button removed since external playback is deliberately disabled on all routes, track sheet de-tinted, subtitle rows now language-first). All three schemes build; 250 tests pass. |
Resolves the TrackSelectionSheet conflict: keep the redesigned iOS sheet (NavigationStack, language-first subtitle rows, metadata pills) and fold in main's provider "Search Subtitles…" entry beside "AI Subtitles…" in the actions section, both availability-gated. Co-Authored-By: Claude Fable 5 <[email protected]>
What changed
Rebuilds the iOS player UI around native idioms (labeled controls, expanding scrubber, gestures, real settings hierarchy) while keeping the Liquid Glass material language. tvOS and macOS are behaviorally unchanged — the shared sheets keep their existing layouts behind platform guards.
Overlay (
MobilePlayerControls)AVRoutePickerViewwrapper), with a two-line title block (series · S:E eyebrow over episode title) anchored top-leading — replaces the row of six identical unlabeled glass circles with a center-truncating title.bufferedAheadSeconds), intro-segment tint, chapter ticks, and a floating time + chapter preview bubble while scrubbing; the other controls recede during a scrub.ViewThatFitsfallback (full → compact → icon circles) so portrait never overflows, even with chapters present.Gestures (new
MobilePlayerGestureLayer, mounted between surface and overlay)beginHoldFastForwardon the VM — releasing restores the configured speed; no-op while paused).Sheets
PlayerTrack.attributePillLabels, refactored out ofattributesLabelwith identical joined output) plus a nav header and Done button; the chapter sheet gets the same header treatment.Reviewer notes
10toskipForward— the VM default is 30s, but the button glyph has always beengoforward.10; this makes behavior match the icon. Happy to flip to 30s + a new glyph instead if the asymmetric Apple-TV-style skip was intentional.UIScreen.mainis deprecated on iOS 26; brightness resolves through the foregroundUIWindowSceneinstead.docs/ios-player-redesign/mockups.htmllocally (untracked —docs/*is gitignored).Verification
Silo(iOS sim),SiloTV(tvOS sim), andSiloMacschemes all build withCODE_SIGNING_ALLOWED=NO.🤖 Generated with Claude Code
Summary by CodeRabbit