@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/dist/waveform-player.cjs +1 -0
- package/dist/waveform-player.cjs.map +2 -2
- package/dist/waveform-player.esm.js +1 -1
- package/dist/waveform-player.esm.js.map +2 -2
- package/dist/waveform-player.js +1 -0
- package/dist/waveform-player.min.js +1 -1
- package/dist/waveform-player.min.js.map +2 -2
- package/package.json +1 -1
- package/src/js/core.js +8 -0
package/package.json
CHANGED
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
|
|