Skip to content

armgit / meet

Public Imported from GitHub
0

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.ts
index 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.ts
index 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?: ProcessorSerialized
noiseReductionEnabled?: boolean
+ audioOutputDeviceId?: string
}
function getUserChoicesState(): LocalUserChoices {
return {
noiseReductionEnabled: false,
+ audioOutputDeviceId: 'default', // Use 'default' to match LiveKit's standard device selection behavior
...loadUserChoices(),
}
}