Open source video conferencing app powered by LiveKit. Built with Django and React.
✨(frontend) add localStorage persistence for audio output device
lebaudantoine355db6ef9aea
diff --git a/src/frontend/src/features/rooms/livekit/hooks/usePersistentUserChoices.ts b/src/frontend/src/features/rooms/livekit/hooks/usePersistentUserChoices.tsindex 5d457efb..b62d4907 100644--- a/src/frontend/src/features/rooms/livekit/hooks/usePersistentUserChoices.ts+++ b/src/frontend/src/features/rooms/livekit/hooks/usePersistentUserChoices.ts@@ -16,6 +16,9 @@ export function usePersistentUserChoices() {saveAudioInputDeviceId: (deviceId: string) => {userChoicesStore.audioDeviceId = deviceId},+ saveAudioOutputDeviceId: (deviceId: string) => {+ userChoicesStore.audioOutputDeviceId = deviceId+ },saveVideoInputDeviceId: (deviceId: string) => {userChoicesStore.videoDeviceId = deviceId},diff --git a/src/frontend/src/stores/userChoices.ts b/src/frontend/src/stores/userChoices.tsindex b0ce11f8..8f4834dd 100644--- a/src/frontend/src/stores/userChoices.ts+++ b/src/frontend/src/stores/userChoices.ts@@ -9,11 +9,13 @@ import {export type LocalUserChoices = LocalUserChoicesLK & {processorSerialized?: ProcessorSerializednoiseReductionEnabled?: boolean+ audioOutputDeviceId?: string}function getUserChoicesState(): LocalUserChoices {return {noiseReductionEnabled: false,+ audioOutputDeviceId: 'default', // Use 'default' to match LiveKit's standard device selection behavior...loadUserChoices(),}}