From 5c56d9aa67a08f1741488c70d82f06e1d0519553 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Thu, 15 Oct 2026 09:30:56 -0700 Subject: [PATCH] Add changelog entry and cite version in docs --- packages/webamp-docs/docs/06_API/03_instance-methods.md | 2 ++ packages/webamp-docs/docs/12_changelog.md | 1 + 2 files changed, 3 insertions(+) diff --git a/packages/webamp-docs/docs/06_API/03_instance-methods.md b/packages/webamp-docs/docs/06_API/03_instance-methods.md index ea4341b9..5d83131b 100644 --- a/packages/webamp-docs/docs/06_API/03_instance-methods.md +++ b/packages/webamp-docs/docs/06_API/03_instance-methods.md @@ -314,6 +314,8 @@ unsubscribe(); ### `onMediaError(cb: (error: { code: number }) => void): () => void` +**Since** [Unreleased](../12_changelog.md#unreleased) + A callback which will be called when the current track fails to load or play, for example because the file could not be fetched or decoded. Webamp then continues as if the track had ended. The callback is passed the `code` of the underlying [`MediaError`](https://developer.mozilla.org/en-US/docs/Web/API/MediaError/code). Returns an "unsubscribe" function. ```ts diff --git a/packages/webamp-docs/docs/12_changelog.md b/packages/webamp-docs/docs/12_changelog.md index 821e3ca8..b409be99 100644 --- a/packages/webamp-docs/docs/12_changelog.md +++ b/packages/webamp-docs/docs/12_changelog.md @@ -13,6 +13,7 @@ If you want access to the changes in this section before they are officially rel - Toggle buttons (Shuffle, Repeat, the EQ and playlist window toggles, and the equalizer's On and Auto buttons) now expose their state to screen readers with `aria-pressed`. - Webamp's buttons can now be reached with Tab and activated with Enter or Space, and screen readers announce them as buttons with names that match their existing tooltips (for example "Play" or "Toggle Shuffle"). Buttons without a tooltip, like the equalizer's "On" and "Auto", now have names too. - The Milkdrop window now has a stable id, `#milkdrop-window`, like `#main-window`, `#equalizer-window` and `#playlist-window`. +- Added a new Webamp instance method: [`webamp.onMediaError(cb)`](./06_API/03_instance-methods.md#onmediaerrorcb-error--code-number---void---void), which is called when a track fails to load or play. ### Bug Fixes