plan: record the seek follow-up

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Test User 2026-07-26 14:29:47 +02:00
parent 0d08c765a1
commit 1e8afd5f41
1 changed files with 33 additions and 0 deletions

View File

@ -1479,3 +1479,36 @@ mixed image+audio, untyped, generic-with-extension, generic-without and video),
and the two live feeds — netzpolitik.org/feed/ now yields 0 episodes with the and the two live feeds — netzpolitik.org/feed/ now yields 0 episodes with the
warning, logbuch-netzpolitik.de/feed/mp3 (→ feeds.metaebene.me/lnp/mp3) yields warning, logbuch-netzpolitik.de/feed/mp3 (→ feeds.metaebene.me/lnp/mp3) yields
559 `audio/mpeg` episodes with `HH:MM:SS` durations. 559 `audio/mpeg` episodes with `HH:MM:SS` durations.
### Follow-up: the keys settled on `,` `.` `<` `>`, and the gauge is clickable
Three rounds on the bindings, and the last one had a reason beyond taste.
`Ctrl-b`/`Ctrl-f` work fine in a browser — the keydown handler already
`prevent_default`s any chord it resolves — but `Ctrl-n`, the long-standing
next-track chord, does **not**: Chrome and Firefox handle it as "new window"
above the page, where `preventDefault` cannot reach. The web client therefore
had no working next-track key at all.
Plain printable characters dodge the whole reserved-chord question, so seek and
track-skip now share two keys in both clients: `,`/`.` seek 15 s, `<`/`>` skip a
track. Same key, shift = bigger jump — self-teaching, and `<`/`>` are the marks
engraved on those keys (mpv uses them for the same thing). `Ctrl-n`/`Ctrl-p`
stay bound as the terminal's primary chords; the web help documents the pair
that always works.
**Click-to-seek shipped without absolute seek**, which had been the deferred
item. The click maps the pointer's x within the gauge to a fraction of the
duration and sends `target - position`. Relative is right here even though the
gesture is absolute: the position it subtracts is the one drawn on the bar the
user just aimed at, at most one 250 ms tick old — far under one pixel of the
bar. That staleness is only fatal for a *repeated* key, which is why keys still
send a fixed step and let the server accumulate. The arithmetic is a pure
function in `state.rs`, tested on the native target: clicks behind the playhead
seek back, the edges are exactly the track's ends, a fraction outside `[0, 1]`
is clamped rather than extrapolated, and a duration of 0 declines.
Also: enabling the web-sys `DomRect` feature, without which
`Element::get_bounding_client_rect` does not exist. Only the wasm build catches
that — `cbd-web`'s `mod app` is `#[cfg(target_arch = "wasm32")]`, so native
clippy never compiles it. Second time this session that the wasm build was the
only gate that would have caught a web-client mistake.