From 1308e52e42789099acec5ae027caf04dbd6ead92 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Thu, 7 Jul 2022 12:10:08 +0200 Subject: [PATCH] Enumerate devices --- src/settings/SettingsModal.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/settings/SettingsModal.tsx b/src/settings/SettingsModal.tsx index 34f3530..7613f0d 100644 --- a/src/settings/SettingsModal.tsx +++ b/src/settings/SettingsModal.tsx @@ -77,11 +77,11 @@ export const SettingsModal = (props: Props) => { selectedKey={audioInput} onSelectionChange={setAudioInput} > - {audioInputs.map(({ deviceId, label }) => ( + {audioInputs.map(({ deviceId, label }, index) => ( {!!label && label.trim().length > 0 ? label - : "Default microphone"} + : `Microphone ${index + 1}`} ))} @@ -91,11 +91,11 @@ export const SettingsModal = (props: Props) => { selectedKey={audioOutput} onSelectionChange={setAudioOutput} > - {audioOutputs.map(({ deviceId, label }) => ( + {audioOutputs.map(({ deviceId, label }, index) => ( {!!label && label.trim().length > 0 ? label - : "Default speaker"} + : `Speaker ${index + 1}`} ))} @@ -126,9 +126,11 @@ export const SettingsModal = (props: Props) => { selectedKey={videoInput} onSelectionChange={setVideoInput} > - {videoInputs.map(({ deviceId, label }) => ( + {videoInputs.map(({ deviceId, label }, index) => ( - {!!label && label.trim().length > 0 ? label : "Default camera"} + {!!label && label.trim().length > 0 + ? label + : `Camera ${index + 1}`} ))}