Returning value from getCurrentTime in seek property getter only if sound is currently playing

This commit is contained in:
Pavle Goloskokovic 2017-12-05 19:47:41 +01:00
parent 6c7f7ae732
commit 5a5444e936

View file

@ -265,7 +265,9 @@ Object.defineProperty(WebAudioSound.prototype, 'detune', {
*/
Object.defineProperty(WebAudioSound.prototype, 'seek', {
get: function () {
return this.getCurrentTime();
if (this.isPlaying) {
return this.getCurrentTime();
}
},
set: function (value) {
}