Skip to content

[bug] Web player: a queued second quality or track change undoes a seek made during the first #4010

Closed

Description

@Quick104

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

  1. In the web player, play a title whose plan can seek anywhere and is delivered over HLS, and stop near 120 s.
  2. Pick another quality. While that request is in flight, pick a third quality or another audio track, so the second change is queued.
  3. Before the first request answers, drag the seek bar back to 30 s.
  4. 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.ts queues the second request with the options it was made with (the shouldQueue branch of replan) and dispatches them unchanged from the finally block after the first request settles.
  • VideoPlayer remembers 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 keeps position_seconds: 120 after 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 existing seek_reanchor-onto-output_change fold 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

  1. added
    bug
    on Nov 12, 2026
  2. Rhainland commented on Nov 12, 2026

    @Rhainland
    Contributor

    Reproduced on origin/main at 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.

  3. added
    impact: playback
    priority: P2
    triaged
    on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugimpact: playbackpriority: P2triaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions