Skip to content

player: a still from the server's preview thumbnails floats above the knob while scrubbing - #767

Merged
GLinnik21 merged 22 commits into
plxnative:mainfrom
dimitrije83:scrub-preview-thumbnails
Oct 16, 2026
Merged

GLinnik21 merged 22 commits into
plxnative:mainfrom
dimitrije83:scrub-preview-thumbnails

Conversation

@dimitrije83

Copy link
Copy Markdown
Contributor

What

While you scrub, a still from the server's video preview thumbnails floats above the knob and follows it. This closes the BIF scrub-thumbnail entries in docs/parity-gaps.md.

How

  • No BIF download. PMS serves single stills at /library/parts/{partId}/indexes/sd/{offsetMs}: one 320×180 JPEG of about 10 KB, the nearest still to the offset, and a 404 when the part has no index. Through /photo/:/transcode it's an ordinary thumb key, so each still goes through the existing poster source and render cache, like a chapter card. The heap concern in the gap entries doesn't arise.
  • appkit::scrub_preview is a render memo held on TransportRow, plus the card geometry and draw.
    • One request in flight, always for the knob's current position, to the nearest second. The server already picks the nearest still, so the client adds no rounding of its own. A held scrub never fills the 64 slots with stills nobody sees, and the last still stays up until the next one lands.
    • No index means nothing drawn. The first request of a playback that settles as a miss before any still has arrived marks the part as having no index. Nothing else is drawn or requested until the next playback: no placeholder box, no request per scrub step.
    • Ending a scrub clears the stills (TransportRow::step, so a scrub that ends with the transport UP-hidden is covered too). The next scrub never opens on the previous one's picture.
  • tex::failed_on / Source::failed generalize the existing logo_failed peek to any keyed art, so the preview can tell "absent" from "not here yet". poster.rs shares one scan between the two.
  • imgcache::classify gives preview stills no disk identity. They are ephemeral, and the 8192-entry LRU belongs to the posters.
  • route::part_id is a public read of cur_part_id.

Tested

  • On a TV: LG OLED55B7V-Z (2017, M16P, webOS 3.9.3), FLAVOR=stable RELEASE=1, installed through Developer Mode, against a PMS with preview thumbnails at a 10 s interval. Stills appear and follow the knob for tap and held scrubs. Items without an index scrub exactly as before.
  • 10 new unit tests in scrub_preview.rs cover a missing index, one request in flight, a stuck request, the stale-still case and the card clamp. One test in imgcache/tests.rs covers the disk exclusion.
  • make check: 89 steps all ok, 16,355 passed, 0 failed. cargo +nightly check --lib --no-default-features: ok. One entry added to ci/list-caps.ini (PENDING_MAX_MS is a timeout, not a list).

Not measured

Frame pacing while stills upload during a scrub. Each still is one roughly 230 KB upload through the poster budget, but I have no rooted set to run profile-tv on, so the GL-upload concern in the gap entry is open. Nothing looked off by eye.

dimitrije83 and others added 22 commits October 15, 2026 19:23
…nob-clock growth

Chrome (title, control row, tabs) fades 150 ms out / 150 ms wait / 250 ms in and is not
hit-registered while hidden; card is 216 tall, width from the still's aspect (cap 518), fitted;
radius 12, 1.5 px rim, 0/12/32 shadow; entrance, reshow, exit and swap motion; 10 s tolerance with
a 400 ms hide; knob clock grows 1.25x when no card shows.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… back to the playhead

Pure parts in appkit::scrub_undo (window deadline and fade, tick rect, chip text and placement,
knob spring) and their wiring in the transport row and HUD draw. Nothing opens the window or
starts the spring from a gesture yet.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…rub waits for OK/PLAY

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ks the chrome

LEFT/RIGHT on a hidden transport arms the gesture on the playhead but moves
nothing; publishing that seed as TX.scrub_ns faded the title, control row and
tabs out and back. publish() now holds -1 while the gesture is still a reveal.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…nothing else has moved the film

The undo window now closes where the HUD is dismissed (the Timing capsule's
close), when a panel takes the page (Chapters / From Beginning seek from
there), and when the control row's Skip pill is activated; BACK arms the undo
only if the transport was visible at the press.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…a test's doc comment

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…animating its size

A font size is never tweened (gfx/tokens.rs): the 25..30 px steps opened a
bold face per size, and 30 is not a rung. Motion::clock_grow is now a 0..1
progress; clock_faces crossfades the resting CAPTION clock with BODY (28, the
rung nearest 1.25x; its bold face is already open for the control row),
baseline-anchored, on the same 150/200 ms ramps. ClockWarm prewarms the
elapsed clock at BODY too.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
- player_hud: one `bar_x(pos, dur)` helper replaces the `knob_x` closure in
  draw_scrub_preview and the open-coded clamp in draw_undo.
- player_hud: draw_hud gates the title block and the control row on one
  `if chrome { .. }` instead of an empty branch plus a second gate.
- scrub_preview::draw: match `Some((old, t))` once, name `boxed` once.
- scrub_undo::Chip: drop the duplicate `text` String; measure the CString.
- screens/player: transport_reset and step_tap_commit use `Scrub::cancel`.
- media/route: `cur_part_id` is pub, replacing the `part_id` wrapper.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit ee7c45a into plxnative:main Oct 16, 2026
11 checks passed
GLinnik21 added a commit that referenced this pull request Oct 16, 2026
Follow-up to #767. A remote-key scrub (LEFT/RIGHT taps and holds, FF/REW) now only moves the target, in both the playing and paused states. Releasing a key never seeks, and the video keeps playing underneath. OK/PLAY/PLAYPAUSE commit the target and play. BACK cancels it, and so do the panel, the Skip pill, an offer or a route change; none of them commit it. The HUD stays up while a target is pending. Releasing a Magic Remote drag still commits.

#767's post-commit undo window (the ghost tick, the "BACK · m:ss" chip and BACK seeking to the origin) is removed: after a commit, BACK has its ordinary meaning. The cancel spring moves to appkit/src/knob_spring.rs.

While the target moves, the preview card keeps the last still that arrived. The 10 s tolerance and the 400 ms hide apply only once the target settles. Previously a fast hold dropped the card even though stills kept arriving.

The tap auto-commit machinery is removed. The player shape lost commit_at, so SCREEN_SHAPES_PIN is bumped and the three replay fixtures are re-recorded. docs/ux-scenario.md §6.4/§6.6 describe click-to-confirm.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

2 participants