From f17cf1ee0ef86dcad324c9f4be77e0850f3c141a Mon Sep 17 00:00:00 2001 From: Enver Morinaj <34061524+emorinaj@users.noreply.github.com> Date: Thu, 18 Nov 2021 10:09:04 +0100 Subject: [PATCH] Update fw_mobile.js Google Chrome returns this error when using EGroupware on mobile: VM6367 fw_mobile.js:487 Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first. https://goo.gl/xX8pDD --- pixelegg/js/fw_mobile.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pixelegg/js/fw_mobile.js b/pixelegg/js/fw_mobile.js index 5e25038d46..16bee622b5 100644 --- a/pixelegg/js/fw_mobile.js +++ b/pixelegg/js/fw_mobile.js @@ -479,7 +479,14 @@ import {tapAndSwipe} from "../../api/js/tapandswipe"; //Audio effect for toggleMenu var audio = jQuery('#egw_fw_menuAudioTag'); - if (egw.preference('audio_effect','common') == '1') audio[0].play(); + if (egw.preference('audio_effect','common') == '1') { + try { + audio[0].play(); + } + catch(err) { + console.log(err); + } + } }, /**