Limiting seek value to be between 0 and current duration in seek property setter

This commit is contained in:
Pavle Goloskokovic 2017-12-05 19:57:07 +01:00
parent 7920ad3b6d
commit f347bcc45a

View file

@ -277,6 +277,7 @@ Object.defineProperty(WebAudioSound.prototype, 'seek', {
}
},
set: function (value) {
value = Math.min(Math.max(0, value), this.duration);
this.currentConfig.seek = value;
}
});