Skip to content

Commit

Permalink
Fixed zoomview waveform resampling when auto zoom is set
Browse files Browse the repository at this point in the history
This is not a complete fix, but now the zoomview waveform
will now have the same length as the overview waveform

See #536
  • Loading branch information
chrisn committed Aug 15, 2024
1 parent 4ce609e commit af5cc6f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/waveform-zoomview.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,8 @@ WaveformZoomView.prototype.setZoom = function(options) {
let scale;

if (isAutoScale(options)) {
const seconds = this._peaks.player.getDuration();

if (!isValidTime(seconds)) {
return false;
}
// Use waveform duration, to match WaveformOverview
const seconds = this._originalWaveformData.duration;

this._zoomLevelAuto = true;
this._zoomLevelSeconds = null;
Expand Down

0 comments on commit af5cc6f

Please sign in to comment.