From c20e3e50d4cb54a47ae1829843b8f66fd1c2e99b Mon Sep 17 00:00:00 2001 From: Chris Needham Date: Fri, 16 Jun 2023 18:00:14 +0100 Subject: [PATCH] Only auto-scroll the zoomview when playing media See #497 --- src/waveform-zoomview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/waveform-zoomview.js b/src/waveform-zoomview.js index 6ea09e52..74355c04 100644 --- a/src/waveform-zoomview.js +++ b/src/waveform-zoomview.js @@ -526,7 +526,7 @@ WaveformZoomView.prototype.playheadPosChanged = function(time) { WaveformZoomView.prototype._syncPlayhead = function(time) { this._playheadLayer.updatePlayheadTime(time); - if (this._enableAutoScroll) { + if (this._autoScroll && this._peaks.player.isPlaying()) { // Check for the playhead reaching the right-hand side of the window. const pixelIndex = this.timeToPixels(time);