Repository navigation
fix(web): load a failed HLS manifest again instead of waiting for the startup timeout - #2293
Conversation
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 46 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to This change makes the player retry a failed HLS manifest by reloading the source, instead of waiting out the 60-second startup timeout. It is narrowly scoped and tested, and no merge-blocking risk was found. Pre-merge checks |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9120c4cfb6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Maintainer review summaryReviewed head: No defects found. The change is ready to merge. What I checked
Earlier threads: the Kody and Codex findings about the 3-second cooldown are fixed in Remaining for maintainers: nothing blocking. I didn't reproduce the node-kill scenario live. The end-to-end result is the author's, from the evidence page. Validated features: #1178 C2 (worker-loss monitoring) is still "Not run", so this change affects no passed case. User manual: no change needed. The manual doesn't document the player's internal startup recovery timing. Apple/Android: no follow-up. This is a workaround for hls.js behavior; the native apps use their platform players. Fit: 9/10 · Readiness: 9/10 — ready
|
Problem
Related issue: #1176
Validation tasks: changes #1178 C2
When the web player switches to a new HLS stream and that stream's master playlist fails to load, the player shows a spinner for a full minute before it asks the server for another route. One way to get there is a transcode node that dies just as the player reconnects to it.
On a fatal network error before the first frame, the player asks hls.js to
startLoad()again. hls.js never requests a master playlist that failed to load in that call, so nothing more happens, no second error arrives, and the player waits out its 60-second startup timeout before it reports the route as failed and replans.For a failed manifest, the player now loads the source again. If that load fails too, the startup guard reports the route as failed at once, so the replan starts within a few seconds instead of a minute. Fragment and playlist errors keep using
startLoad(), which does retry them.Approach
manifestLoadError,manifestLoadTimeOut,manifestParsingError) reload the source; the URL is the same one the transport loaded first.startup_timeoutplan failure, as before.Validation
startLoad(), and a second one reports the plan failed. The new test fails without the change. The hls.js test mocks gained theErrorDetailsconstants the code now reads.pnpm exec vitest runfor the player components: pass.main(web player, two transcode nodes, one proxy), killing the transcode node with SIGKILL right after a health sweep, so the server hands the reconnect the dead node's URL: before, the player sat on the spinner for 60 seconds before it reported the failure; after, it reported it 7 seconds after the dead manifest. Onmainthat recovery replan is then refused asadaptation_exhausted, a server problem fixed separately in fix(playback): replan around a transcode or proxy node that stopped answering #2292; with that fix the reconnect doesn't get the dead URL in the first place.make test-webpass, and so do the Go build, vet, lint and everyverify-*target.make test-gofails on this macOS host in the same tests as onmain; this change has no Go code.Evidence: https://evidence.siloserver.org/r/silo-server/pr-2293/
Risks
None identified. A manifest that keeps failing still ends in the same plan failure, only sooner.
Checklist
AI Disclosure