From fa710a7f981c363c099898c1a84c2e7381390d91 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 11 Feb 2020 13:43:52 +0100 Subject: [PATCH] Don't play if we're already playing --- voicegardens/static/voicegardens.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/voicegardens/static/voicegardens.js b/voicegardens/static/voicegardens.js index f5cf463..5b5dd13 100644 --- a/voicegardens/static/voicegardens.js +++ b/voicegardens/static/voicegardens.js @@ -376,7 +376,7 @@ class GeneratedShape { /** * Play a sound after a collision is detected. **/ - if (this.soundRecorded.isLoaded()) { + if (this.soundRecorded.isLoaded() && !this.soundRecorded.isPlaying()) { this.soundRecorded.play(); } }