From 5f2bd7ebde5589945cc37aead55e7cedcb44e7d0 Mon Sep 17 00:00:00 2001 From: emeric Date: Sat, 10 Sep 2022 14:05:33 +0200 Subject: [PATCH] Fixed bad call to init audio ctx when the login form is used. ref #194 --- docroot/js/mediaplayer.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docroot/js/mediaplayer.js b/docroot/js/mediaplayer.js index 2a588621..279554c2 100644 --- a/docroot/js/mediaplayer.js +++ b/docroot/js/mediaplayer.js @@ -38,10 +38,6 @@ LMS.mediaplayer = function () { _initAudioCtx(); }; - document.addEventListener("touchstart", _unlock); - document.addEventListener("touchend", _unlock); - document.addEventListener("click", _unlock); - let _initAudioCtx = function() { if (_audioIsInit) { _audioCtx.resume(); // not sure of this @@ -321,6 +317,9 @@ LMS.mediaplayer = function () { event.preventDefault(); }); + document.addEventListener("touchstart", _unlock); + document.addEventListener("touchend", _unlock); + document.addEventListener("click", _unlock); } let _removeAudioSources = function() {