You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With version 7.7.8 of wavesurfer.js, I’m experiencing a recurring issue with playback. When clicking near the start of the waveform, an intermittent error appears about 2 out of 10 times:
Uncaught (in promise) RangeError: Failed to execute 'start' on 'AudioBufferSourceNode': The offset provided (-0.0444035) is less than the minimum bound (0).
Additionally, after this error occurs, the following error sometimes appears when trying to stop the audio:
Uncaught InvalidStateError: Failed to execute 'stop' on 'AudioScheduledSourceNode': cannot call stop without calling start first.
The only way to resolve the issue is by refreshing the page and trying again. This seems to happen more frequently when clicking near the beginning of the waveform.
Environment
Browser: Chrome
wavesurfer.js version: 7.7.8
Minimal code snippet
The issue occurs in the _play() and _pause() methods in wavesurfer.js:
// In _play():lete=this.playedDuration*this._playbackRate;e>=this.duration&&(e=0,this.playedDuration=0),this.bufferNode.start(this.audioContext.currentTime,e);// In _pause():null===(t=this.bufferNode)||void0===t||t.stop();
Expected result
Audio playback should start and stop without errors or negative offsets, even when clicking near the start of the waveform.
Obtained result
Intermittent RangeError due to a negative offset and occasional InvalidStateError from stop being called without start. The error can only be resolved by reloading the page.
The text was updated successfully, but these errors were encountered:
"It's not complicated to replicate the error; sometimes it happens, sometimes it doesn't. You just need to click at the beginning of the waveform within the first six lines, and that will be enough for it to fail."
Bug description
With version 7.7.8 of wavesurfer.js, I’m experiencing a recurring issue with playback. When clicking near the start of the waveform, an intermittent error appears about 2 out of 10 times:
Additionally, after this error occurs, the following error sometimes appears when trying to stop the audio:
The only way to resolve the issue is by refreshing the page and trying again. This seems to happen more frequently when clicking near the beginning of the waveform.
Environment
Minimal code snippet
The issue occurs in the
_play()
and_pause()
methods in wavesurfer.js:Expected result
Audio playback should start and stop without errors or negative offsets, even when clicking near the start of the waveform.
Obtained result
Intermittent
RangeError
due to a negative offset and occasionalInvalidStateError
fromstop
being called withoutstart
. The error can only be resolved by reloading the page.The text was updated successfully, but these errors were encountered: