Repository navigation
fix(player): restart backward HLS seeks - #499
Merged
Merged
Conversation
Preserve negative player-time offsets for targets before a copy-mode HLS window so the existing transcode restart path handles them. Co-Authored-By: GPT-5.6 Sol <[email protected]>
Contributor
📝 WalkthroughWalkthrough
ChangesMedia timeline offset handling
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
cursor Bot
pushed a commit
to Prairie-Server/prairie-server
that referenced
this pull request
Jul 27, 2026
Bring in fix(player): restart backward HLS seeks (Silo-Server#499). Co-authored-by: Jonah May <[email protected]>
dreulavelle
added a commit
to kipsilabs/Vio
that referenced
this pull request
Jul 27, 2026
fix(player): restart backward HLS seeks (Silo-Server#499)
2 tasks done
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
During copy-mode HLS playback, seeking to a media timestamp earlier than the current stream origin could leave playback near the current position instead of moving backward. I reproduced #498 against the shared debug deployment with the local Vite frontend: after seeking to 4150.8s, a seek to the beginning remained around 1:09 because the media element was asked to seek to local time zero inside the existing HLS window.
Approach
Preserve negative player-time offsets when a media target precedes the current HLS stream origin. Copy-mode HLS already advertises
can_seek_anywhere=false; the negative offset therefore falls outside the media element's seekable ranges and reaches the existing transcode restart path instead of being mistaken for local time zero.The regression test locks in that pre-origin media targets remain negative while media-time output retains its existing non-negative clamp.
Verification
pnpm exec vitest run src/player/utils/mediaTimeline.test.ts— 6/6 passed.https://silo.arkyncdn.netthrough the local Vite proxy — before: backward seek stayed near 1:09; after: the same seek showed 0:00, restarted ffmpeg withseek_seconds=0, and playback advanced from the beginning.pnpm run lint— passed with 0 errors (existing warnings only).pnpm run format:check— passed.pnpm run build— passed.GOWORK=off GOCACHE="$DEV_CACHE_ROOT/go-build" GOMODCACHE="$DEV_CACHE_ROOT/go-mod" go build ./internal/... ./cmd/...— passed.make verify-local-paths— passed.pnpm test— 1,367 passed; 6 unrelated failures remain inSeasonContent.test.tsxandServerStorageStep.test.tsx. Both failing files are unchanged fromorigin/main(missing test QueryClient/ResizeObserver setup).A browser recording and screenshot were captured locally under
output/playwright/issue-498/. GitHub attachment is still needed if maintainers want the raw UI recording on the PR.Adversarial review
Clean — no material findings.
main: approved; confirmed copy-mode HLS setscan_seek_anywhere=false, the pre-origin target falls through to the server restart, and no other production consumer receives the negative value.Risks & follow-up
Low risk:
toPlayerTimehas one production caller, the web video player's seek path. Encoded HLS streams use origin zero, so their behavior is unchanged. No Android or Apple client follow-up is required because this change is isolated to the web player.Closes #498
AI Disclosure
🤖 Generated with Codex
Summary by CodeRabbit