Skip to content

fix: report clips that fall back to a placeholder - #202

Merged
dazzatronus merged 1 commit into
mainfrom
fix/report-clips-that-cannot-display
Sep 24, 2026
Merged

dazzatronus merged 1 commit into
mainfrom
fix/report-clips-that-cannot-display

Conversation

@dazzatronus

Copy link
Copy Markdown
Contributor

When an svg, image or video clip can't be displayed, its player draws a placeholder and resolves load(). clip:loadFailed only fired when load() rejected, so these failures were never reported. getClipError() also missed svg render failures entirely, because they don't go through the asset loader. A host had no way to tell a working clip from a broken one.

Players now record the reason on loadError, set when they fall back and cleared on each load or reload. The reconciler emits clip:loadFailed when a load or reload finishes with loadError set, and getClipError() checks the player first. load() still resolves, so nothing that awaits it changes. Timelines pick up svg failures through the same error marker failed videos already get.

The svg player also had two related problems, fixed here:

  • reloadAsset() threw on a failed render and left the clip blank. It now falls back like load() does.
  • A placeholder drawn after a failure stayed on screen when a later render succeeded.

Failures are located when they're reported, not when the load started, because clips can move while an asset is still loading.

Verify: npm test. The five new tests in svg-player.test.ts and edit-load.test.ts fail without the source change.

@dazzatronus
dazzatronus merged commit c1eb51f into main Sep 24, 2026
1 check passed
@dazzatronus
dazzatronus deleted the fix/report-clips-that-cannot-display branch September 24, 2026 12:56
github-actions Bot pushed a commit that referenced this pull request Sep 24, 2026
## [2.22.1](v2.22.0...v2.22.1) (2026-09-24)

### Bug Fixes

* report clips that fall back to a placeholder ([#202](#202)) ([c1eb51f](c1eb51f))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.22.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant