From 4ab41e9323970a9c3a8b0acd654319a23fbb583e Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Tue, 2 Jun 2026 09:45:10 -0400 Subject: [PATCH] zebra-spaces: populate mic dropdown on page load (was: only on devicechange / getMic) The mic-select dropdown only got refreshed via two paths: a 'devicechange' event listener and the getMic() call that ran when the user entered a space. So a visitor sitting on the landing page (or re-loading after device order shifted) saw only the placeholder 'default microphone' option. Camera-select already had the initial refreshCameraList() call; mirroring that for mic. Labels stay blank until mic permission is granted but deviceIds populate so the user can see how many inputs exist + pick before joining. --- web/zebra-spaces.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/web/zebra-spaces.html b/web/zebra-spaces.html index 3aba94f..14822d7 100644 --- a/web/zebra-spaces.html +++ b/web/zebra-spaces.html @@ -2267,6 +2267,11 @@ $('music-mode').addEventListener('change', async (e) => { if (navigator.mediaDevices && navigator.mediaDevices.addEventListener){ navigator.mediaDevices.addEventListener('devicechange', refreshMicList); } +/* initial population so the dropdown lists the user's inputs before they + * enter a space (matches what the camera-select does). Labels are blank + * until mic permission is granted; deviceIds still populate so the user + * sees how many inputs exist. */ +refreshMicList(); /* ================================================================== * leave / entry buttons @@ -2338,8 +2343,8 @@ logLine('', 'ready โ€” pick a handle, type a rendezvous code, enter the space');