8000 fix(preview): drop seeking-guard that froze playback in all 3 previews by johannboehme · Pull Request #44 · johannboehme/tk-1 · GitHub
[go: up one dir, main page]

Skip to content

fix(preview): drop seeking-guard that froze playback in all 3 previews 8000 - #44

Merged
johannboehme merged 2 commits into
mainfrom
claude/cam-preview-no-seeking-guard
May 9, 2026
Merged

johannboehme merged 2 commits into
mainfrom
claude/cam-preview-no-seeking-guard

Conversation

@johannboehme
Copy link
Copy Markdown
Owner

Summary

#43 added a defensive `if (videoEl.seeking) return` guard to the sync logic in all three preview surfaces (Triage, Arrange, editor compositor pool). Intent was to avoid stacking `currentTime` writes during the 100-400 ms decoder warmup. In practice it broke playback in all of them:

  • The browser pauses the `
  • The seeking-guard returned BEFORE that recovery path → after a seek, play() is never re-issued → video frozen on a stale frame.

Visible symptoms after #43 landed in main:

  • Triage: continuous scrubs / loop-wraps land during the previous seek's warmup → guard skips → user sees stale frames jump-cut to catch up = "ruckeln"
  • Arrange: initial play() seeks; while seeking the guard skips every subsequent tick → recovery never runs → video frozen
  • Editor compositor: same in `video-element-pool.ts:syncSlot` — `

The jump-vs-natural classifier in #43 already prevents the original stutter loop (natural advance only seeks at >500 ms drift; jumps seek at >50 ms). The seeking-guard was redundant and harmful — browsers handle "newer setCurrentTime supersedes in-flight seek" internally.

Test plan

  • 983 unit tests pass (one test inverted to assert play() IS called during/after seek)
  • Triage: scrub + chunk-click responsive, no "ruckeln"
  • Arrange: initial play actually plays the video
  • Editor compositor: scrubbing + pill-wechsel keep video advancing

🤖 Generated with Claude Code

johannboehme and others added 2 commits May 9, 2026 23:00
#43 added a defensive `if (videoEl.seeking) return` guard to the sync
effects in both CamPreview surfaces. Intent was to avoid stacking
currentTime writes during the 100-400 ms decoder warmup. In practice it
broke responsive scrubbing and froze Arrange playback:

- Triage: continuous scrubs / loop-wraps land during the previous
  seek's warmup → guard skips → user sees stale frames jump-cut to
  catch up = visible "ruckeln".
- Arrange: initial play() seeks; while seeking the guard skips every
  subsequent tick, including the `if (isPlaying && videoEl.paused)
  play()` recovery path. Browser's seek-implicit pause is never
  re-played → video frozen.

The jump-vs-natural classifier already prevents the original stutter
loop (natural advance with a generous 500 ms threshold; only jumps
trigger seeks). The seeking-guard was redundant and harmful — browsers
handle "newer setCurrentTime supersedes in-flight seek" internally.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Same bug as Triage+Arrange (3f21766) — the pool's syncSlot had its own
`if (v.seeking) return` that suppressed the play() recovery while the
browser had implicitly paused the element during a seek. Result: editor
preview videos froze on the first seek.

The jump-vs-natural classifier already prevents the original stutter
loop. Browsers handle a fresh currentTime write supersession during an
in-flight seek internally — we don't need the guard.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@johannboehme
johannboehme merged commit c1fc9d8 into main May 9, 2026
1 check passed
@johannboehme
johannboehme deleted the claude/cam-preview-no-seeking-guard branch May 9, 2026 21:21
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.

1 participant

0