Repository navigation
fix(core): a film moves on past a video the browser never starts loading - #7368
Merged
Merged
Conversation
Contributor
Edit accuracy: accurate 267 (base branch 267), smooth 103 of thoseThe gate passes. Quarantined, measured but not gated (8)
Unstable (1)
|
Contributor
There was a problem hiding this comment.
Approve at 222fd344. No blockers.
Verified
- Fails without the fix: with
media.tsfromorigin/main, two tests fail:init.test.ts› "a video the browser never starts loading › moves the film on past it after the wait and names it", andmedia.test.ts› "skips and names a clip the browser never started loading 5 s after it was asked to play". Both pass at this head, and so does the slow-fetch (progress) test. - All of
media.test.tspasses (190 tests). - A skipped clip can still recover.
isUnplayableis checked again on every tick, so a late first byte firesprogressand the clip plays again. ANotAllowedErrorrefusal still clears the wait, andemptiedclears both marks. - The runtime does not use MSE or HLS, so a
blob:source that never firesprogresscannot be wrongly skipped.
Non-blocking note: with a time to first byte over 5 s, the film now moves on without that video, and the video joins late. Before, the film held. This matches the tradeoff #7355 already made, but the Player Safari perf run on this head is still in progress, so it is worth reading before merge.
This was referenced Nov 7, 2026
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.
What
A film with a video the browser never starts loading now moves on after the usual 5 s wait, instead of freezing. The runtime skips that video and names it in a warning:
skipping "…/clip.mp4": the browser never started loading it; the rest plays.Why
Safari sometimes leaves a video at
networkStateLOADING andreadyStateHAVE_NOTHING without ever sending its request. #7347 traced this in the Safari perf runs: the server receives no request, and the page has no resource-timing entry. The runtime holds playback while a due video has no data. The skip from #7355 covers a video that stopped after its header (HAVE_METADATA and NETWORK_IDLE), but not this state, so a viewer's film held at that frame indefinitely. A one-timeload()does not recover it (#7347).Related work
isUnplayable, with the same 5 s wait from the first play request and the same one-time warning.How
media.ts:stallSinceFirstAskreturns why a video is stalled 5 s after it was first asked to play. It is either "after its header" (fix(core): skip a video the browser can't decode instead of freezing the film #7355's case) or "never started": HAVE_NOTHING and NETWORK_LOADING with noprogressevent since it was first asked to play.progresscondition keeps a slow fetch waiting. Bytes are arriving there, so the browser did start it.isUnplayableuses that reason in its warning. Playback, the playhead's media hold and the audio clock already skip anythingisUnplayablereports, so the film moves on.emptiedevent (a new source) clears both the wait and the bytes mark, as it already cleared the wait.Test plan
media.test.ts: a clip at HAVE_NOTHING and NETWORK_LOADING is kept at 4999 ms, then skipped and named at 5000 ms. The same clip with aprogressevent is still kept at 60 s.init.test.ts: a muted video in that state, played for 7 s of frames, moves the playhead past 1 s and logs the warning.progressfails the slow-fetch test.media.test.ts(190 tests) and the new film test pass 3 runs in a row. The whole runtime suite passes (2864 tests). Coretypecheck,test:hyperframe-runtime-ci, oxlint, oxfmt and the comment checks are clean.Size
One state added to the existing skip check, plus three tests.