Skip to content

armgit / meet

Public Imported from GitHub
0

Open source video conferencing app powered by LiveKit. Built with Django and React.

🐛(frontend) fix audio device ID persistence from settings panel

lebaudantoine27a0128b2a8e
diff --git a/src/frontend/src/features/settings/components/tabs/AudioTab.tsx b/src/frontend/src/features/settings/components/tabs/AudioTab.tsx
index 9b7a1a78..1347b2ff 100644
--- a/src/frontend/src/features/settings/components/tabs/AudioTab.tsx
+++ b/src/frontend/src/features/settings/components/tabs/AudioTab.tsx
@@ -11,6 +11,7 @@ import { useTranslation } from 'react-i18next'
import { SoundTester } from '@/components/SoundTester'
import { HStack } from '@/styled-system/jsx'
import { ActiveSpeaker } from '@/features/rooms/components/ActiveSpeaker'
+import { usePersistentUserChoices } from '@/features/rooms/livekit/hooks/usePersistentUserChoices'
import { ReactNode } from 'react'
type RowWrapperProps = {
@@ -60,6 +61,8 @@ export const AudioTab = ({ id }: AudioTabProps) => {
const { t } = useTranslation('settings')
const { localParticipant } = useRoomContext()
+ const { saveAudioInputDeviceId } = usePersistentUserChoices()
+
const isSpeaking = useIsSpeaking(localParticipant)
const {
@@ -116,7 +119,10 @@ export const AudioTab = ({ id }: AudioTabProps) => {
defaultSelectedKey={
activeDeviceIdIn || getDefaultSelectedKey(itemsIn)
}
- onSelectionChange={(key) => setActiveMediaDeviceIn(key as string)}
+ onSelectionChange={(key) => {
+ setActiveMediaDeviceIn(key as string)
+ saveAudioInputDeviceId(key as string)
+ }}
{...disabledProps}
style={{
width: '100%',