everyone joins as a listener. host (first to enter) can invite listeners to the
@@ -721,18 +721,17 @@ async function onRoleChanged(prev, next){
updateRoleUI();
}
async function ensureMicAndUI(){
+ /* mic input + music-mode rows are always visible; here we just grant the
+ * mic and unblock mute. Toggling music-mode before getting a mic is fine —
+ * micConstraints() reads the live `musicMode` flag whenever we re-acquire. */
try {
await getMic(); await refreshMicList();
- $('row-mic-controls').style.display = 'flex';
- $('row-music-mode').style.display = 'flex';
$('btn-mute').disabled = false;
} catch(e){ logLine('err','mic blocked: '+e.message); }
updateRoleUI();
}
function dropMic(){
if (micStream){ micStream.getTracks().forEach(t=>t.stop()); micStream = null; }
- $('row-mic-controls').style.display = 'none';
- $('row-music-mode').style.display = 'none';
$('btn-mute').disabled = true;
}
function updateRoleUI(){
@@ -983,8 +982,8 @@ logLine('', 'ready — pick a handle, type a rendezvous code, enter the space');