This commit is contained in:
ponzischeme89
2026-08-24 22:56:46 +12:00
parent 4f95767e2f
commit 396d35e2f5
48 changed files with 1541 additions and 672 deletions
+44 -1
View File
@@ -2130,7 +2130,7 @@ gained a duplicate on a copy-paste, looks identical to one that did not. The gre
assembled separately so the authenticated name is trimmed once; the player also draws from
the same tone-specific pool while it prepares a programme.
**Next up / auto-advance.** 30 s before an episode ends, `PlayerActivity` slides up
**Next up / auto-advance.** Inside the last minute of an episode, `PlayerActivity` fades in
`player_next_up_banner.xml` and rolls into the next episode when it reaches zero (Settings
→ Playback turns it off; `Settings.autoPlayNextEpisode`). Which episode that is comes from
`repository.nextEpisode`, dual-path like everything else: `/v1/items/{id}/next` on the
@@ -2144,6 +2144,49 @@ inside the running player instead of relaunching the activity, so `itemId`/`play
/`stopReported` must all be reset together or the outgoing episode is never reported
stopped; and a movie simply resolves to null, which is why nothing special-cases item type.
**The bar is compact because the credits are the programme.** It was a 420dp card against
the end wall that shrank the picture to 58% and slid it left to make room for itself — so
the one part of an episode the overlay covered was its closing minute, which is the thing
the viewer is still watching. It is now a short bar in the bottom-left safe area: the
show's own title treatment, a hairline, `NEXT EPISODE` over the countdown, and a draining
ring. Nothing else — no episode thumbnail, no synopsis, no panel. Things to preserve:
- **Nothing on it is focusable and it takes no focus**, which is what lets every gate it
used to appear in be *removed* rather than tightened. `seekControlsActive`,
`centrePausesPlayback` and `skipIntroCanShow` no longer mention it, so the centre key
still pauses and Left/Right still skip while it is up — the remote goes on meaning what
it meant a moment before the bar appeared. It is the only overlay in this player that
owns nothing, and `nextUpCanShow` is the other half of that bargain: wherever something
that *does* own the screen is up — the transport, which shares the same bottom edge, the
drop-up, the cast panel, the credits pane, the loading or error surfaces — the bar stands
down rather than being drawn underneath it, and comes back when they go.
- **The two actions survive without buttons.** Back dismisses, the same one-press-per-level
contract every other overlay here has; Play now is the transport's own Next Episode
control, which `shouldOfferNextEpisodeButton` offers under exactly the conditions this
bar appears under. A pair of pills on the bar would need focus, and focus is the thing
being given back.
- **The identity is bound when the episode is *resolved*, not when the bar is drawn.**
That is a minute or more of lead time, so the logo is already in the slot when the bar
fades in and the viewer never sees the name swapped for artwork — the swap
`setUpPlaybackIdentity` takes such care to avoid in the opposite corner. `nextUpBoundItemId`
is what keeps it to one bind per episode rather than one per 250 ms tick, and the text
fallback is shown meanwhile because a bar held back waiting on a logo is a bar that is
late for the thing it was announcing.
- **The ring is `CountdownRingView`**, shared with the skip-intro offer, which now differs
from it only in taking its colours from its own drawable state (that button inverts on
focus; this bar cannot be focused). Both are advanced from the *playhead* — a pause holds
the ring and a seek moves it — and both redraw only past a degree of movement, which over
a minute at 250 ms is most of the ticks skipped on a box that has a decoder to feed.
- **The figure and the line under the eyebrow are the same value**, from `formatRemaining`.
Two countdowns on one bar reading "60s" and "1:00" is a bar that looks broken.
- **`NEXT_UP_ACCENT` is written out rather than built with `Color.rgb`.** `PlayerActivity`'s
companion is initialised by plain JUnit tests with no Android framework under them, and
one android.graphics call from there fails every test in the file.
- Screenshots are `NextUpOverlayScreenshotTest``build/screenshots/next-up/`, over a
deliberately bright stand-in frame and captured at the full screen size rather than
cropped to the bar: whether the programme is still visible around it is the whole claim
the redesign makes, and it is not a thing a unit test can check.
**One next-item pipeline.** `ui/player/NextUpPipeline.kt` owns the answer to "what plays
after this?", and everything that wants to know reads it from there: the manual Next Episode
button, the next-up banner, the credits pane, the countdown and the ended frame. Before it,