@arraypress/waveform-player 1.8.0 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arraypress/waveform-player",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "Lightweight, customizable audio player with waveform visualization",
5
5
  "type": "module",
6
6
  "types": "./index.d.ts",
package/src/js/core.js CHANGED
@@ -890,6 +890,14 @@ export class WaveformPlayer {
890
890
  // Clear or update markers
891
891
  this.options.markers = options.markers || [];
892
892
 
893
+ // Reset the waveform to the NEW track's peaks, or null to regenerate
894
+ // from the URL. mergeOptions() above keeps the previous track's
895
+ // this.options.waveform when the caller passes none, and load() does
896
+ // `if (this.options.waveform) setWaveformData(...)` — so without this
897
+ // reset a track loaded without peaks would redraw the PREVIOUS track's
898
+ // waveform (audio changes, visualization doesn't).
899
+ this.options.waveform = options.waveform || null;
900
+
893
901
  // Load the new track
894
902
  await this.load(url);
895
903