Resetting previousTime property when stopping sound or hijacking audio from another sound

This commit is contained in:
Pavle Goloskokovic 2018-01-12 15:58:43 +01:00
parent de9e5a0d1f
commit 398b337da9

View file

@ -153,6 +153,7 @@ var HTML5AudioSound = new Class({
selectedSound.reset();
selectedSound.audio = null;
selectedSound.startTime = 0;
selectedSound.previousTime = 0;
}
return true;
},
@ -161,6 +162,7 @@ var HTML5AudioSound = new Class({
this.audio.dataset.used = 'false';
this.audio = null;
this.startTime = 0;
this.previousTime = 0;
},
reset: function () {
BaseSound.prototype.stop.call(this);