Change audio devices in call #112

Merged
hodlbod merged 2 commits from feature/98-audio-settings-in-call into dev 2026-04-02 19:33:49 +00:00
Collaborator

This adds a little settings icon in VoiceWidget that opens a dialog where you can change your audio input and output device.

Screenshot 2026-04-01 at 2.24.18 PM.png

This adds a little settings icon in VoiceWidget that opens a dialog where you can change your audio input and output device. ![Screenshot 2026-04-01 at 2.24.18 PM.png](/attachments/97ee113c-309f-4014-80f6-29003671bfc0)
hodlbod reviewed 2026-04-01 19:59:15 +00:00
@@ -0,0 +50,4 @@
md.addEventListener("devicechange", onDeviceChange)
return () => {
md.removeEventListener("devicechange", onDeviceChange)
}
Owner

A less verbose version:

loadDevices()
navigator.mediaDevices?.addEventListener?.("devicechange", loadDevices)
return () => navigator.mediaDevices?.removeEventListener?.("devicechange", loadDevices)
A less verbose version: ``` loadDevices() navigator.mediaDevices?.addEventListener?.("devicechange", loadDevices) return () => navigator.mediaDevices?.removeEventListener?.("devicechange", loadDevices) ```
Author
Collaborator

ok yeah the AI was worried about keeping the linter happy because loadDevices returns a promise that we don't await, but it was hallucinating and I don't know enough to know better.

ok yeah the AI was worried about keeping the linter happy because loadDevices returns a promise that we don't await, but it was hallucinating and I don't know enough to know better.
hodlbod marked this conversation as resolved
src/app/voice.ts Outdated
@@ -46,0 +71,4 @@
case DeviceKind.AudioOutput:
label = "speaker"
break
}
Owner

why not const label = kind === DeviceKind.AudioInput ? "microphone" : "speaker"

why not `const label = kind === DeviceKind.AudioInput ? "microphone" : "speaker"`
Author
Collaborator

Mostly because I'm adding DeviceKind.VideoInput in another branch.

Mostly because I'm adding `DeviceKind.VideoInput` in another branch.
hodlbod marked this conversation as resolved
Owner

Looks pretty good, maybe use ModalSubtitle for the "choose microphone" text, and make Done full width for consistency

Looks pretty good, maybe use ModalSubtitle for the "choose microphone" text, and make `Done` full width for consistency
mplorentz requested review from hodlbod 2026-04-02 19:28:23 +00:00
hodlbod added 2 commits 2026-04-02 19:33:41 +00:00
hodlbod force-pushed feature/98-audio-settings-in-call from 666351bf4f to 617b5c9fca 2026-04-02 19:33:41 +00:00 Compare
hodlbod merged commit 61ed632579 into dev 2026-04-02 19:33:49 +00:00
hodlbod deleted branch feature/98-audio-settings-in-call 2026-04-02 19:33:49 +00:00
Sign in to join this conversation.