WEBDEV-8963: Migrate audio-element into elements - #77
Open
jbuckner wants to merge 3 commits into
Open
Conversation
Move @internetarchive/audio-element out of the iaux monorepo as ia-audio-element. First of seven, the rest of the radio player stacks on top of this. - AudioSource is an interface now instead of a class. It has no behaviour, and the old tests already passed it as plain JSON, so the class identity was never doing anything. - Tests move from Karma to Vitest browser mode. Vitest needs the Playwright launch flag --autoplay-policy=no-user-gesture-required, which Karma set itself, or every playback test fails on the autoplay policy. - play() catches its own rejection. Karma let the floating promise slide, Vitest fails the run on an unhandled rejection. - The element now re-dispatches a media error. Nothing did before, and with the promise caught there was no way at all to tell a dead source from silence. It fires once the browser has exhausted its <source> candidates (networkState hits NETWORK_NO_SOURCE), so a failing source with a working fallback behind it stays quiet. - duration passes NaN through the way HTMLMediaElement does, and says so. Claude-Session: https://claude.ai/code/session_01U6iNyGicKJywdrWJMTyFin Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A failing browser-mode test drops a screenshot in .vitest-attachments/, and unlike __screenshots__ it wasn't ignored, so one got committed by accident. Claude-Session: https://claude.ai/code/session_01U6iNyGicKJywdrWJMTyFin Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #77 +/- ##
==========================================
- Coverage 81.44% 80.48% -0.97%
==========================================
Files 27 29 +2
Lines 927 989 +62
Branches 227 236 +9
==========================================
+ Hits 755 796 +41
- Misses 110 126 +16
- Partials 62 67 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Aug 26, 2026
…udio-element * origin/main: WEBDEV-8972: Run CI on every PR, not just ones based on main (#90)
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.
WEBDEV-8963. Bottom of the radio player stack (WEBDEV-8962), the other six components go on top of this one.
Two things that aren't just a file move:
vite.config.tspasses--autoplay-policy=no-user-gesture-requiredto Playwright. Karma set this itself and the Vitest provider doesn't, so without it every playback test fails.errornow. It never did, and sinceplay()has to catch its own rejection for Vitest, there was otherwise no way to tell a dead source from silence. It only fires once the browser runs out of<source>candidates, so a failing source with a working fallback behind it stays quiet.AudioSourceis an interface instead of a class. It has no behaviour and the old tests already passed it as plain JSON.