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.
This commit is contained in:
parent
e3c4431b8e
commit
4ab41e9323
1 changed files with 7 additions and 2 deletions
|
|
@ -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');
|
|||
|
||||
<footer style="margin:2.2rem auto 0;font-size:0.65rem;color:#999;line-height:1.7;word-break:break-all;font-family:monospace">
|
||||
<span id="pi-seal" style="color:#777;cursor:default;user-select:none" title="">page integrity</span> · built <span class="stamp-date">2026-06-02</span><br>
|
||||
md5 <span class="stamp-md5">db2c13fdc5565041fb83200fb0d380bc</span><br>
|
||||
sha256 <span class="stamp-sha">cea86b6c1acde906423fbd1f7a2a2ba31f6f2aa6b0962b432706ffe6ae18bd59</span><br>
|
||||
md5 <span class="stamp-md5">497177716ecd141a36ec3b5765a55457</span><br>
|
||||
sha256 <span class="stamp-sha">2718fbf7796bc90da2fbb88bc5eb226cbb8c0f116c023d1292cdaf681fd48274</span><br>
|
||||
<span style="color:#bbb">hashes are of this page with these two fields zeroed — to verify, blank them and re-hash</span><br>
|
||||
<span style="color:#bbb">one self-contained file — <strong>save a copy</strong> and verify against these hashes; point at your own servers with ?signal= and ?turncred=, or <a href="host-your-own.html" style="color:#999">host your own community</a></span>
|
||||
</footer>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue