From d44178c3cbc2d6d462d3215a7f2929dc889a51c9 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Fri, 3 Jan 2025 08:48:03 -0500 Subject: [PATCH] Don't unmute until camera/microphone are enabled --- static/galene.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/static/galene.js b/static/galene.js index 1a0e60a..b10cff6 100644 --- a/static/galene.js +++ b/static/galene.js @@ -621,8 +621,12 @@ getInputElement('hqaudiobox').onchange = function(e) { document.getElementById('mutebutton').onclick = function(e) { e.preventDefault(); let localMute = getSettings().localMute; - localMute = !localMute; - setLocalMute(localMute, true); + if (localMute && !findUpMedia('camera')) { + displayMessage('Please use Enable to enable your camera or microphone.'); + } else { + localMute = !localMute; + setLocalMute(localMute, true); + } }; document.getElementById('sharebutton').onclick = function(e) {