Repository navigation
fix(loader): wait for every file and the media probe before loading - #384
Merged
antobinary merged 1 commit intoNov 18, 2026
Merged
Conversation
The loader counted the keys stored so far against the number of files, but the media probe is stored in the same object. The count could reach the number of files with one file still missing (a slow slides_new.xml left the chat empty for good) or with the media probe still pending (the webcams crashed on undefined media and left a blank page). A HEAD probe failing at the network level also rejected the whole probe, so no media was ever stored. Failed probes now count as missing formats, and a failing audio fallback probe shows the error page. Formats are taken from the probe order instead of the response URL, which a redirect (e.g. to a signed URL) changes.
germanocaumo
force-pushed
the
fix-loader-wait-all-files
branch
from
November 17, 2026 17:54
170804f to
2e9f307
Compare
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 does this PR do?
Makes the loader wait for every data file and for the media probe before it renders the player.
hasLoadedcompared the number of keys stored so far with the number of files, but the media probe is stored in the same object. The count could reach the number of files while one of them was still missing:storage.messagesandstorage.thumbnailsare cached on first read, so with a slowslides_new.xmlthe chat stays empty for the whole session.storage.media.find(mediais undefined) and the page goes blank.The 1 s delay before showing the player hid most of this on fast connections.
Separately, a HEAD probe failing at the network level (blocked or reset request) rejected the whole
Promise.all, so no media was ever stored and the page went blank as above. Failed probes now count as missing formats, and a failing audio fallback probe shows the error page. The formats are read from the probe order instead of the response URL, which a redirect changes: a probe redirected to a signed URL such aswebcams.mp4?signature=…stored[undefined]and no source played.Also part of #376, which bundles it with a redesign.
How to test
Open a recording with these requests delayed or failed (DevTools request blocking/throttling, or Playwright routes):
slides_new.xmldelayed 5 svideo/webcams.*delayed 5 sCannot read properties of undefined (reading 'find')video/webcams.webmfails (net::ERR_FAILED), mp4 okwebcams.*404,audio/audio.webm)video/webcams.mp4redirected towebcams.mp4?signature=xsrc/utils/data/storage.test.jscovers both arrival orders, a redirected probe and the failing probes (5 tests, all fail on develop).Also compared with develop on recordings from 3.0.27+ (
show_presentation), 3.0.2–3.0.26 (show_screenshareonly), 2.6 (tldraw, nolayout.xml), ≤2.5 (PNG slides), audio-only andlayout.single, at desktop and phone widths: same player state, media, chat and thumbnails as develop in every case.Changelog