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.
2 parents 7edc8af + 0ec5601 commit e06aaf6Copy full SHA for e06aaf6
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