diff --git a/bin/em/variabletime/web/js/audio.js b/bin/em/variabletime/web/js/audio.js index 77557e2..9c3b4f6 100644 --- a/bin/em/variabletime/web/js/audio.js +++ b/bin/em/variabletime/web/js/audio.js @@ -44,6 +44,7 @@ const Audio = function(tp, record) { //}, //}); let started = false; + let allowedMicrophone = true; // TODO: actually use this let mapping = {}; let savedMapping = {}; @@ -915,7 +916,15 @@ const Audio = function(tp, record) { visualize(); }) .catch(function(err) { - console.log("The following gUM error occured: " + err); + console.log("Audio::init","The following gUM error occured: " + err); + const noPermission = err.message.toLowerCase().indexOf('permission') >= 0; + if (noPermission) { + if (allowedMicrophone) { + alert("We don't have permission to access the microphone. Microphone input will be silent."); + } + allowedMicrophone = false; + // TODO: actually use this + } }); } else { console.log("getUserMedia not supported on your browser!");