diff --git a/zebra-report/zebra-spaces.html b/zebra-report/zebra-spaces.html index 62db2e4..3ccdc65 100644 --- a/zebra-report/zebra-spaces.html +++ b/zebra-report/zebra-spaces.html @@ -4106,8 +4106,13 @@ $('btn-leave').addEventListener('click', async () => { $('btn-enter').disabled = false; $('btn-leave').disabled = true; $('btn-mute').disabled = true; - $('btn-mute').textContent = 'mute'; $('btn-mute').className=''; muted = false; - try { sessionStorage.removeItem(MUTE_STATE_KEY); } catch(_){} + $('btn-mute').textContent = 'mute'; $('btn-mute').className=''; + /* Preserve the user's last mute choice across leave+rejoin — + * fox: 'when I leave and rejoin the mic state is unmuted'. Don't + * touch MUTE_STATE_KEY here; the next promotion / bless-reclaim + * reads it back via applyMuteState. The local `muted` variable + * still resets so the in-page UI is clean while disconnected. */ + muted = (function(){ try { return sessionStorage.getItem(MUTE_STATE_KEY) === '1'; } catch(_){ return false; } })(); logLine('', 'left the space'); }); @@ -4117,8 +4122,8 @@ logLine('', 'ready — pick a handle, type a rendezvous code, enter the space');