Skip to content

fix(loader): wait for every file and the media probe before loading - #384

Merged
antobinary merged 1 commit into
bigbluebutton:developfrom
germanocaumo:fix-loader-wait-all-files
Nov 18, 2026
Merged

antobinary merged 1 commit into
bigbluebutton:developfrom
germanocaumo:fix-loader-wait-all-files

Conversation

@germanocaumo

@germanocaumo germanocaumo commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Makes the loader wait for every data file and for the media probe before it renders the player.

hasLoaded compared 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:

  • A data file arrives after the media probe: the player renders without it. storage.messages and storage.thumbnails are cached on first read, so with a slow slides_new.xml the chat stays empty for the whole session.
  • The media probe answers after every data file: the webcams crash on storage.media.find (media is 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 as webcams.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):

Scenario develop this PR
slides_new.xml delayed 5 s player loads, chat empty (0 of 61 messages) chat complete (61)
HEAD video/webcams.* delayed 5 s blank page, Cannot read properties of undefined (reading 'find') player loads
HEAD video/webcams.webm fails (net::ERR_FAILED), mp4 ok blank page plays the mp4
audio-only (webcams.* 404, audio/audio.webm) loads loads
HEAD video/webcams.mp4 redirected to webcams.mp4?signature=x player without a video source plays the mp4

src/utils/data/storage.test.js covers 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_screenshare only), 2.6 (tldraw, no layout.xml), ≤2.5 (PNG slides), audio-only and layout.single, at desktop and phone widths: same player state, media, chat and thumbnails as develop in every case.

Changelog

  • Technical: the loader waits for every data file and the media probe; failed media probes no longer reject the whole probe; media formats come from the probe order, not the response URL
  • User-facing: fixes an empty chat or a blank page when a recording's files load slowly

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
germanocaumo force-pushed the fix-loader-wait-all-files branch from 170804f to 2e9f307 Compare November 17, 2026 17:54
@antobinary
antobinary merged commit 11365fc into bigbluebutton:develop Nov 18, 2026
1 check passed
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.

2 participants