From 5a5444e93679e1e4da332214f8fa778f26074cf3 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Tue, 5 Dec 2017 19:47:41 +0100 Subject: [PATCH] Returning value from getCurrentTime in seek property getter only if sound is currently playing --- v3/src/sound/webaudio/WebAudioSound.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/v3/src/sound/webaudio/WebAudioSound.js b/v3/src/sound/webaudio/WebAudioSound.js index f1f2a9726..e4e558944 100644 --- a/v3/src/sound/webaudio/WebAudioSound.js +++ b/v3/src/sound/webaudio/WebAudioSound.js @@ -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) { }