Skip to content

Commit 5a5444e

Browse files
Returning value from getCurrentTime in seek property getter only if sound is currently playing
1 parent 6c7f7ae commit 5a5444e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

v3/src/sound/webaudio/WebAudioSound.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,9 @@ Object.defineProperty(WebAudioSound.prototype, 'detune', {
265265
*/
266266
Object.defineProperty(WebAudioSound.prototype, 'seek', {
267267
get: function () {
268-
return this.getCurrentTime();
268+
if (this.isPlaying) {
269+
return this.getCurrentTime();
270+
}
269271
},
270272
set: function (value) {
271273
}

0 commit comments

Comments
 (0)