Persistent bottom-bar player singleton: window.WaveformBar.init(config). Embeds one
self-mode WaveformPlayer, and drives inline external-mode players on the page via
data-wb-* triggers.
npm test— vitest (run before committing).npm run build— iife + esm + min + css.prepublishOnlyruns it.npm run size— gzipped JS/CSS.npm run dev— watch build.
Adding a config key takes two edits in src/js/core.js, and skipping the second
fails silently — no error, the option just never reaches the player:
- Add the key to the
DEFAULTSobject (~line 23). - Add a forward line in
_initPlayer(), next to the colour forwards (~line 648):if (this.config.<key>) opts.<key> = this.config.<key>;
There is no spread of this.config into opts anywhere — if it isn't on that list,
it doesn't propagate. Grep opts\.\w* = this\.config to see the full current set.
core.js— the singleton,DEFAULTS,_initPlayer(), lifecycle.actions.js—data-wb-*trigger wiring.queue.js— track queue.dom.js— bar markup.icons.js— inline SVG.storage.js— persistence.utils.js,index.js— entry +window.WaveformBar.
- Ships no
index.d.ts. The fourwaveform-bar-*wrappers hand-declareWaveformBarConfigin their ownsrc/types.ts. Nothing links those types toDEFAULTShere, so they drift silently — a new config key means editing all four. - Peer dep on
@arraypress/waveform-player@^1.x;dist/is committed. - Logging prefix
[WaveformBar].
An option change here is usually part of a 15-package family batch —
load the waveform-release skill rather than editing this repo alone.