From b3033d0a949d5a307adecaef31dded1b6c32d895 Mon Sep 17 00:00:00 2001 From: Chris McCord Date: Mon, 8 Nov 2021 14:52:45 -0500 Subject: [PATCH] Only show enable audio modal if not allowed --- assets/js/app.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/js/app.js b/assets/js/app.js index 88df096..9f0c222 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -64,7 +64,11 @@ Hooks.AudioPlayer = { this.player.play().then(() => { if(sync){ this.player.currentTime = nowSeconds() - this.playbackBeganAt } this.progressTimer = setInterval(() => this.updateProgress(), 100) - }, error => execJS("#enable-audio", "data-js-show")) + }, error => { + if(error.name === "NotAllowedError"){ + execJS("#enable-audio", "data-js-show") + } + }) }, pause(){