broad-painter-9222
09/15/2025, 3:23 PMlivekit/components-react and I'm wondering if there's a way to persist user's audio output device and use for the initial selection?
usePersistentUserChoices hook only allows saving audio input and and LocalUserChoices doesn't include audioOutputDeviceIdtall-airline-16756
09/15/2025, 3:23 PMtall-airline-16756
09/15/2025, 3:24 PMusePersistentUserChoices hook in @livekit/components-react currently doesn’t support saving audio output device choices. It’s mainly set up to remember things like the audio input device ID, video input device ID, and other settings such as whether audio/video is enabled and the username.
Since LocalUserChoices doesn’t include audioOutputDeviceId, you might consider creating a custom solution to save and retrieve your user’s preferred audio output device. A common approach is to store the selected device ID in local storage or something similar, then apply it when your app initializes. I hope this helps, and please feel free to ask if you need any guidance on how to set that up!
Sources: agent-console/app/_components/control-bar.tsx | packages/core/CHANGELOG.md | components/livekit/agent-control-bar/hooks/use-agent-control-bar.ts