Skip to content

Commit

Permalink
Only auto-scroll the zoomview when playing media
Browse files Browse the repository at this point in the history
See #497
  • Loading branch information
chrisn committed Jun 16, 2023
1 parent a8e7ca6 commit c20e3e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/waveform-zoomview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c20e3e5

Please sign in to comment.