Returning config value when paused and 0 when stopped when getting seek value

This commit is contained in:
Pavle Goloskokovic 2017-12-07 20:58:07 +01:00
parent e4ca4d4b75
commit 8d161ac06d

View file

@ -258,9 +258,12 @@ Object.defineProperty(WebAudioSound.prototype, 'seek', {
if (this.isPlaying) { if (this.isPlaying) {
return this.getCurrentTime(); return this.getCurrentTime();
} }
else { else if (this.isPaused) {
return this.currentConfig.seek; return this.currentConfig.seek;
} }
else {
return 0;
}
}, },
set: function (value) { set: function (value) {
value = Math.min(Math.max(0, value), this.duration); value = Math.min(Math.max(0, value), this.duration);