From 95d49f15cb25ebdd25edb71defbf7a6bcb3a0921 Mon Sep 17 00:00:00 2001 From: Myron Blair Date: Sun, 21 Jun 2026 14:26:54 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20kiosk=20voice=20reliability=20=E2=80=94?= =?UTF-8?q?=20stopListening=20on=20exit,=20exitVoiceMode=20kiosk=20guard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - stopListening() called in both toggleKiosk exit and _onFsChange so mic stops when leaving kiosk (was staying live indefinitely) - exitVoiceMode() now returns early if kiosk-mode active so the 30-min idle timer and face-detection loop cannot kill the always-on mic --- public_html/assets/js/jarvis-app.js | 3 +++ public_html/index.html | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/public_html/assets/js/jarvis-app.js b/public_html/assets/js/jarvis-app.js index fcdec9d..b71b683 100644 --- a/public_html/assets/js/jarvis-app.js +++ b/public_html/assets/js/jarvis-app.js @@ -1405,6 +1405,7 @@ function enterVoiceMode(source) { } function exitVoiceMode() { + if (document.body.classList.contains('kiosk-mode')) return; voiceMode = false; voiceMuted = false; updateMicBtn(); @@ -1794,6 +1795,7 @@ async function toggleKiosk() { if (ex) ex.call(document).catch(() => {}); if (_wakeLock) { _wakeLock.release().catch(() => {}); _wakeLock = null; } document.body.classList.remove("kiosk-mode"); + if (typeof stopListening === "function") stopListening(); if (btn) { btn.textContent = "⧞ KIOSK"; btn.style.color = ""; } if (!isTablet()) document.body.classList.remove("tablet-mode"); } @@ -1810,6 +1812,7 @@ function _onFsChange() { if (!document.fullscreenElement && !document.webkitFullscreenElement) { if (_wakeLock) { _wakeLock.release().catch(() => {}); _wakeLock = null; } document.body.classList.remove("kiosk-mode"); + if (typeof stopListening === "function") stopListening(); if (btn) { btn.textContent = "⧞ KIOSK"; btn.style.color = ""; } if (!isTablet()) document.body.classList.remove("tablet-mode"); } diff --git a/public_html/index.html b/public_html/index.html index 3771494..3d8b1a3 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -426,12 +426,12 @@ style="position:fixed;top:-9999px;left:-9999px;width:320px;height:240px"> - - - - - - + + + + + +