From 050f1dc3939348c16b26fa5e18d13cb889a810cd Mon Sep 17 00:00:00 2001 From: gabriellsh <40830821+gabriellsh@users.noreply.github.com> Date: Thu, 18 Sep 2025 20:13:55 -0300 Subject: [PATCH] chore: Ensure device provider lists have at least one listed device (#36983) --- .../client/providers/DeviceProvider/DeviceProvider.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/meteor/client/providers/DeviceProvider/DeviceProvider.tsx b/apps/meteor/client/providers/DeviceProvider/DeviceProvider.tsx index afa2e2b236d..dc264c12a36 100644 --- a/apps/meteor/client/providers/DeviceProvider/DeviceProvider.tsx +++ b/apps/meteor/client/providers/DeviceProvider/DeviceProvider.tsx @@ -70,9 +70,12 @@ export const DeviceProvider = ({ children }: DeviceProviderProps): ReactElement type: device.kind, })); - const audioInput = mappedDevices.filter((device) => device.type === 'audioinput'); + const filteredInput = mappedDevices.filter((device) => device.type === 'audioinput'); - const audioOutput = mappedDevices.filter((device) => device.type === 'audiooutput'); + const filteredOutput = mappedDevices.filter((device) => device.type === 'audiooutput'); + + const audioInput = filteredInput.length > 0 ? filteredInput : [defaultDevices.defaultAudioInputDevice]; + const audioOutput = filteredOutput.length > 0 ? filteredOutput : [defaultDevices.defaultAudioOutputDevice]; return { audioInput,