feat(calls): select mic/camera/speaker instead of system default (LC-144) #172
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/lc-144-call-device-select"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
LC-144: let a user pick which microphone, camera, and speaker a call/voice session uses instead of always taking the system default. Applies to both 1:1 calls and enclave voice channels; selections persist across reloads.
How
server/assets/devices.js(window.LetsChatDevices) owns the preference (localStorage, keyed byMediaDeviceKind), builds the getUserMedia constraints, routes the speaker viasetSinkId, and renders the picker modal opened from any[data-lc-open-devices]control.call.jsandvoice.jsacquire all media through the module:getUserMediahonors the pinned mic/camera as anexactdeviceId, falling back to defaults when the device is gone (OverconstrainedError/NotFoundError). Camera-only paths (camera toggle, screen-share restore) honor the pinned camera too.lc:speaker-changecustom event). Speaker row hidden wheresetSinkIdis unsupported (Firefox).devicechangeevent while open, and offers a transient "Show device names" grant when labels are blank (no permission yet).contentnow scansassets/**/*.js(excludingvendor/) so JS-injected utility classes (the picker, and the existing voice tile markup) are generated.Scope notes (v1)
replaceTrackis deferred (issue stretch goal): mic/camera apply at the next call start; only the speaker re-routes live.Test
just checkclean (standalone + saas, clippy + fmt).just testandjust test-saasboth green (0 failures). Askama templates compile with the new markup.