diff --git a/src/script/media/MediaDevicesHandler.ts b/src/script/media/MediaDevicesHandler.ts index 42c8d3db573..00912a5ba9c 100644 --- a/src/script/media/MediaDevicesHandler.ts +++ b/src/script/media/MediaDevicesHandler.ts @@ -234,30 +234,12 @@ export class MediaDevicesHandler { device => device.kind === MediaDeviceType.VIDEO_INPUT, ); - /* - * On Windows the same device can be listed multiple times with different group ids ("default", "communications", etc.). - * In such a scenario, the device listed as "communications" device is preferred for conferencing calls, so we filter its duplicates. - */ const microphones = mediaDevices.filter(device => device.kind === MediaDeviceType.AUDIO_INPUT); - const dedupedMicrophones = microphones.reduce>((microphoneList, microphone) => { - if (!microphoneList.hasOwnProperty(microphone.deviceId) || microphone.deviceId === 'communications') { - microphoneList[microphone.groupId] = microphone; - } - return microphoneList; - }, {}); - const speakers = mediaDevices.filter(device => device.kind === MediaDeviceType.AUDIO_OUTPUT); - const dedupedSpeakers = speakers.reduce>((speakerList, speaker) => { - if (!speakerList.hasOwnProperty(speaker.deviceId) || speaker.deviceId === 'communications') { - speakerList[speaker.groupId] = speaker; - } - return speakerList; - }, {}); - return { cameras: videoInputDevices, - microphones: Object.values(dedupedMicrophones), - speakers: Object.values(dedupedSpeakers), + microphones: microphones, + speakers: speakers, }; }