Bloom books' audio and video don't play on release-v0.20.x: files of 500 KB or more, and all narration on Chromium 91 and older
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Target branch: release-v0.20.x
Observed behavior
kolibri-zipgives BloomRunner an absolute…/zipcontent/<file>/<path>URL for every audio or video entry of 500 KB or more (BloomRunner.js:108-113).- Bloom Player's
fullUrl(bloomPlayer-02a77592459cdf0b1bd7.min.js, line 116) prefixes everysrcthat does not start withblob:with the book's blob URL. A video'ssrcbecomesblob:http://<host>/<book id>/http://<host>/content/zipcontent/<file>/video/a.mp4. - BloomRunner writes each narration
idanddata-backgroundaudioas_<last URL segment>(BloomRunner.js:30-40). The player's narration lookup andcurrentMusicUrlrebuild that asblob:http://<host>/<segment>, soaudio/music.mp3becomesblob:http://<host>/music.mp3. - On Chromium 91 and older (Android WebView 83), every page turn throws
Uncaught TypeError: c(...).split(...).at is not a function. The narration lookup andcurrentMusicUrlcallArray.prototype.at(Chromium 92+), and the bundle has no polyfill. - Local books and a peer's books are both affected.
- v0.19.4 and v0.19.5 ship the same player bundle and the same runner code.
- #15039 (closed) fixed this on develop only: its player build carries
0003-Pass-URLs-that-carry-a-scheme-through-fullUrl.patchand0006-Play-audio-from-URLs-the-book-already-resolved.patch.
User-facing consequences
A learner sees a blank video and hears no narration or background music wherever the file is 500 KB or more. On Chromium 91 and older, no narration or background music plays, whatever the file size.
Steps to reproduce
- Import a Bloom book with a video of 500 KB or more, such as a sign-language book.
- Open the book in Learn and go to the video's page.
- Inspect the page's
<video>or<source>: itssrcis theblob:…/http://…URL above, and the network tab shows no request tozipcontent/<file>.bloompub/video/….
On Chromium 91 and older:
- Install a release-v0.20.x Android build on an Android 11 emulator (WebView 83).
- Import the Bloom folder of the Kolibri QA Channel (token
nakav-mafak) and open "Стаза од давнина" in Learn > Library > Kolibri QA Channel > Bloom > bloompub. - Turn a page with
adb logcat chromium:I *:Srunning: theat is not a functionerror is logged.
Context
- release-v0.20.x at
b19ef0f009. - The 0.20 bundle is built from learningequality/bloom-player's
patchedbranch (README). - Fix by backporting develop's in-tree Bloom Player build: de380cef09, 24a7deaca7, 9c8cbc2db4, fedca7ca29, fb535babaf, e5782c4b65, 7832c1ea96.
- Copying develop's bundle alone does not work: it reads
data-audio-srcanddata-original-hreffrom the book, which only develop'sBloomRunner.jswrites. - Keep release-v0.20.x's peer URLs (
zipcontentArchiveUrl,zipcontentEntryUrl) inBloomRunner.js. Develop's runner does not use them. - Develop's build polyfills
Array.prototype.atwith core-js.
Acceptance Criteria
- [ ] release-v0.20.x builds Bloom Player from
bloom_build/as develop does. - [ ] On release-v0.20.x, a Bloom book's video of 500 KB or more plays, requested from
zipcontent/<file>/<path>. - [ ] Narration and background audio of 500 KB or more play, requested from
zipcontent/<file>/<path>. - [ ] Audio and video under 500 KB still play from their blob URLs.
- [ ] A peer's book requests the same files from
zipcontent/<encoded peer>/<file>/<path>. - [ ] Tests cover a large video
src, a large narration file and a largedata-backgroundaudiofile. - [ ] On Chromium 80–91 (Android WebView 83), paging a Bloom book from first to last page logs no
at is not a functionerror. - [ ] On the same browser, a Bloom book's narration plays.
AI usage
Claude Code drafted this from a self-review finding on the branch for #15970. It ran the shipped bundle's fullUrl and currentMusicUrl on local and peer zipcontent URLs to get the URLs quoted above. I chose the backport and folded #16029 into this issue.
Chose the fix: backport develop's in-tree Bloom Player build. Develop's bundle can't be copied over by itself because it depends on develop's runner. Dropped the #15970 condition from the criteria now that it's closed.
Folded in #16029: the backported build's core-js polyfill also fixes Array.prototype.at on Chromium 91 and older. Added its symptom, repro and criteria.
Plan: release-v0.20.x ships develop's Bloom Player build, so media of 500 KB or more and Chromium 80–91 narration play (#16025).
- [ ] Cherry-pick the seven commits
- [ ] Rebuild the player on release
- [ ] Cover large video, narration and background audio for local and peer books
- [ ] Verify in browsers
- [ ] Self-review the produced code
Assumptions — the issue did not settle these; say so if one is wrong.
- Without
ef769853c1'stox.ymlfilters, a bundle-only PR to release runs no Python tests; if that matters, those two lines go in as a release-only commit. - If a rebuild on release differs from develop's bundle, develop's bundle still ships and the PR names the cause; if wrong, release's build replaces
static/bloom/andbloom_build.json. - One table-driven spec replaces develop's local-only large-audio test on release; if wrong, keep develop's test and add the peer rows beside it.
- The QA phase has an Android 11 emulator (WebView 83), the rig #16029 was reproduced on; if not, the two Chromium 80–91 criteria need a person with that emulator.
Written by rtibblesbot, an LLM-based coding agent.