Repository navigation
Description
What happened
In the web player, a seek made while two track or quality changes are in flight is undone by the second one. The first replacement stream starts at the seek once #3988 lands, but the queued second request still carries the position it was queued with, so its stream jumps back there.
usePlaybackSession queues a quality or track change made while another replan is in flight (pendingReplanRef) together with its positionSeconds. A seek made after that never updates the queued request. The one existing fold, a seek_reanchor onto a queued output_change, doesn't cover this case.
Not reproduced live. A component probe and a session-hook probe with mocked transports show it (see Technical notes).
Steps to reproduce
- In the web player, play a title whose plan can seek anywhere and is delivered over HLS, and stop near 120 s.
- Pick another quality. While that request is in flight, pick a third quality or another audio track, so the second change is queued.
- Before the first request answers, drag the seek bar back to 30 s.
- Observe: the first new stream starts at 30 s. When the queued change's stream replaces it, playback jumps back to about 120 s.
Expected behavior
The newest seek wins over the position a queued change was made at, as it does for a single quality change after #3988.
Silo version / commit
main at 8dadc2c plus #3988 (head 84856cd). On main alone the seek is lost in this flow too, along with the single-change case #3988 fixes.
Deployment
Local dev build (component tests only)
Area
Web app
Clients affected
- Web UI
Client app and device
Web UI, any browser. Apple and Android clients not checked.
Media and playback details
Any HLS delivery whose plan has can_seek_anywhere: true.
Relevant logs
No logs available. Found by reading the source and confirmed with in-memory probes.
Technical notes
usePlaybackSession.tsqueues the second request with the options it was made with (theshouldQueuebranch ofreplan) and dispatches them unchanged from thefinallyblock after the first request settles.VideoPlayerremembers a seek made during a replan only until the first replacement stream attaches (replanSeekRef, added in fix(web): keep a seek made while a quality change loads #3988). By the time the queued plan lands, the seek has been used.- Probes: a VideoPlayer component test in which revision 3 builds hls.js with
startPosition: 120, expected 30. A session-hook test in which the queued replan body keepsposition_seconds: 120after playback reports 30. - Possible fix: when the player seeks while a request is queued, fold the target into the queued request's
positionSeconds, as the existingseek_reanchor-onto-output_changefold does.
This follows #3988, which changes the same seek path in VideoPlayer. Start the fix after it merges.
AI harness
Claude Code (via T3 Code); Codex for an independent review
AI tool(s)
Claude Code, Codex, GitHub CLI
AI model(s)
claude-opus-5-5; gpt-6.1-sol
AI involvement
Fully AI-generated from a review of #3988.
Independent or adversarial review
Found independently by a claude-opus-5-5 code-review pass and a gpt-6.1-sol review of #3988. The gpt-6.1-sol review ran the probes above.
Confirmations
- I searched open and recently closed issues and pull requests, and this is not already reported
- I reproduced this myself on a real deployment
- Any logs provided are raw apart from marked redactions and are not AI-summarized; if none were available, I said so above
Source: found in review of #3988
Activity
Rhainland commentedon Nov 12, 2026
Reproduced on
origin/mainat 0b579aa: in headless Chromium on the production bundle, playing a synthetic file at 120 s, I picked 720p, then 480p while the first replan was held, then clicked the seek bar at 30 s. The 720p stream started at 30 s, and the queued 480p change then jumped playback back to 123 s.Cause: the queued change kept the position it was picked at, and a later seek never reached it.
Fix in #4025: a seek made while a quality, track or output change is queued now moves that queued change to the seek. Checked on a local build of the fix: with the same steps, the queued 480p stream continues from about 30 s. A quality change with no seek, and a single change with a seek, behave as before. A session-hook test covers the queued change after a seek.
AI disclosure: reproduced and fixed by Claude Code (claude-opus-5-5) at the maintainer's direction.