@@ -3390,6 +3390,8 @@ async function handleSignal(raw){
setStatus('connected as '+myRole, 'ok');
$('dot-call').className='dot ok';
$('btn-leave').disabled = false;
+ $('btn-leave').classList.remove('hidden');
+ $('btn-mute').classList.remove('hidden');
$('sec-room').classList.remove('hidden');
/* remember which space this tab is in so a hard refresh auto-rejoins.
* sessionStorage is per-tab so tab A in space X + tab B in space Y
@@ -4592,6 +4594,8 @@ function handleBlocked(source){
sfuUnsubscribe().catch(()=>{});
dropMic();
$('btn-leave').disabled = true;
+ $('btn-leave').classList.add('hidden');
+ $('btn-mute').classList.add('hidden');
$('btn-enter').disabled = false;
}
@@ -4848,8 +4852,12 @@ $('btn-copy-share').addEventListener('click', async () => {
return;
}
$('rdv-code').value = saved;
- logLine('', 'auto-rejoining last space …');
- setTimeout(() => { joinSpace().catch(e => logLine('err', 'auto-rejoin failed: ' + e.message)); }, 100);
+ /* Don't auto-call joinSpace. Without a user gesture the audio
+ * pool can't be primed (Firefox Android refuses unmuted autoplay)
+ * and listener phones land silent. Pre-fill the code; one tap on
+ * 'enter' resumes with working audio. */
+ logLine('', 'last space: '+saved+' — click enter to resume');
+ setStatus('click enter to resume — '+saved, 'warn');
})();
/* games as left-column tiles — click to spotlight, broadcast through
@@ -4905,8 +4913,10 @@ $('btn-leave').addEventListener('click', async () => {
setStatus('left', null);
$('btn-enter').disabled = false;
$('btn-leave').disabled = true;
+ $('btn-leave').classList.add('hidden');
$('btn-mute').disabled = true;
- $('btn-mute').textContent = 'mute'; $('btn-mute').className='';
+ $('btn-mute').classList.add('hidden');
+ $('btn-mute').textContent = 'mute'; $('btn-mute').className = 'hidden';
/* 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
@@ -4922,8 +4932,8 @@ logLine('', 'ready — pick a handle, type a rendezvous code, enter the space');