Skip to content

Commit af5cc6f

Browse files
committed
Fixed zoomview waveform resampling when auto zoom is set
This is not a complete fix, but now the zoomview waveform will now have the same length as the overview waveform See #536
1 parent 4ce609e commit af5cc6f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/waveform-zoomview.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -335,11 +335,8 @@ WaveformZoomView.prototype.setZoom = function(options) {
335335
let scale;
336336

337337
if (isAutoScale(options)) {
338-
const seconds = this._peaks.player.getDuration();
339-
340-
if (!isValidTime(seconds)) {
341-
return false;
342-
}
338+
// Use waveform duration, to match WaveformOverview
339+
const seconds = this._originalWaveformData.duration;
343340

344341
this._zoomLevelAuto = true;
345342
this._zoomLevelSeconds = null;

0 commit comments

Comments
 (0)