We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7edc8af commit 0ec5601Copy full SHA for 0ec5601
src/livekit/MediaDevicesContext.tsx
@@ -97,7 +97,11 @@ function useMediaDevice(
97
}
98
99
return {
100
- available: available ?? [],
+ available: available
101
+ ? // Sometimes browsers (particularly Firefox) can return multiple
102
+ // device entries for the exact same device ID; deduplicate them
103
+ [...new Map(available.map((d) => [d.deviceId, d])).values()]
104
+ : [],
105
selectedId: alwaysDefault ? undefined : devId,
106
select,
107
};
0 commit comments