Updating previousTime property when setting seek value

This commit is contained in:
Pavle Goloskokovic 2018-01-12 16:01:19 +01:00
parent 1cdebc80c3
commit 2a76c6eff5

View file

@ -284,7 +284,8 @@ Object.defineProperty(HTML5AudioSound.prototype, 'seek', {
if (this.isPlaying || this.isPaused) {
value = Math.min(Math.max(0, value), this.duration);
if (this.isPlaying) {
this.audio.currentTime = value;
this.previousTime =
this.audio.currentTime = value;
}
else if (this.isPaused) {
this.currentConfig.seek = value;