From 0800c6082f033ee34bb1d60c681fcf6bbebaac5f Mon Sep 17 00:00:00 2001 From: todoroff Date: Thu, 20 Aug 2020 15:53:49 +0100 Subject: [PATCH 1/2] fix seeking performance issues and console errors --- src/wavesurfer.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/wavesurfer.js b/src/wavesurfer.js index 818325156..d8ad7f017 100755 --- a/src/wavesurfer.js +++ b/src/wavesurfer.js @@ -900,20 +900,12 @@ export default class WaveSurfer extends util.Observer { } this.fireEvent('interaction', () => this.seekTo(progress)); - const paused = this.backend.isPaused(); - // avoid draw wrong position while playing backward seeking - if (!paused) { - this.backend.pause(); - } // avoid small scrolls while paused seeking const oldScrollParent = this.params.scrollParent; this.params.scrollParent = false; this.backend.seekTo(progress * this.getDuration()); this.drawer.progress(progress); - if (!paused) { - this.backend.play(); - } this.params.scrollParent = oldScrollParent; this.fireEvent('seek', progress); } From 04dbec6167cd9c1518093f73c9e0c878b8d92b11 Mon Sep 17 00:00:00 2001 From: todoroff Date: Fri, 25 Sep 2020 16:27:48 +0100 Subject: [PATCH 2/2] fix seekTo performance issues while playing audio --- CHANGES.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 69a6e15e5..0269c2af5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,11 @@ wavesurfer.js changelog ======================= +Next (unreleased) +----------------- + +- Fix performance issues with `seekTo` while audio is playing (#2045) + 4.1.1 (24.09.2020) ------------------ - Revert Code cleanup for Observer class (#2069)