Setting paused time (seek) before calling stopAndRemoveBufferSource since getCurrentTime depends on startTime value and it gets reset in stopAndRemoveBufferSource method

This commit is contained in:
Pavle Goloskokovic 2017-12-07 20:13:52 +01:00
parent bf3a0167f9
commit c3107ca629

View file

@ -82,8 +82,8 @@ var WebAudioSound = new Class({
return false;
}
// \/\/\/ isPlaying = false, isPaused = true \/\/\/
this.stopAndRemoveBufferSource();
this.currentConfig.seek = this.getCurrentTime(); // Equivalent to setting paused time
this.stopAndRemoveBufferSource();
return true;
},
resume: function () {