Enumerate devices
This commit is contained in:
parent
f6d356c5ce
commit
1308e52e42
1 changed files with 8 additions and 6 deletions
|
@ -77,11 +77,11 @@ export const SettingsModal = (props: Props) => {
|
||||||
selectedKey={audioInput}
|
selectedKey={audioInput}
|
||||||
onSelectionChange={setAudioInput}
|
onSelectionChange={setAudioInput}
|
||||||
>
|
>
|
||||||
{audioInputs.map(({ deviceId, label }) => (
|
{audioInputs.map(({ deviceId, label }, index) => (
|
||||||
<Item key={deviceId}>
|
<Item key={deviceId}>
|
||||||
{!!label && label.trim().length > 0
|
{!!label && label.trim().length > 0
|
||||||
? label
|
? label
|
||||||
: "Default microphone"}
|
: `Microphone ${index + 1}`}
|
||||||
</Item>
|
</Item>
|
||||||
))}
|
))}
|
||||||
</SelectInput>
|
</SelectInput>
|
||||||
|
@ -91,11 +91,11 @@ export const SettingsModal = (props: Props) => {
|
||||||
selectedKey={audioOutput}
|
selectedKey={audioOutput}
|
||||||
onSelectionChange={setAudioOutput}
|
onSelectionChange={setAudioOutput}
|
||||||
>
|
>
|
||||||
{audioOutputs.map(({ deviceId, label }) => (
|
{audioOutputs.map(({ deviceId, label }, index) => (
|
||||||
<Item key={deviceId}>
|
<Item key={deviceId}>
|
||||||
{!!label && label.trim().length > 0
|
{!!label && label.trim().length > 0
|
||||||
? label
|
? label
|
||||||
: "Default speaker"}
|
: `Speaker ${index + 1}`}
|
||||||
</Item>
|
</Item>
|
||||||
))}
|
))}
|
||||||
</SelectInput>
|
</SelectInput>
|
||||||
|
@ -126,9 +126,11 @@ export const SettingsModal = (props: Props) => {
|
||||||
selectedKey={videoInput}
|
selectedKey={videoInput}
|
||||||
onSelectionChange={setVideoInput}
|
onSelectionChange={setVideoInput}
|
||||||
>
|
>
|
||||||
{videoInputs.map(({ deviceId, label }) => (
|
{videoInputs.map(({ deviceId, label }, index) => (
|
||||||
<Item key={deviceId}>
|
<Item key={deviceId}>
|
||||||
{!!label && label.trim().length > 0 ? label : "Default camera"}
|
{!!label && label.trim().length > 0
|
||||||
|
? label
|
||||||
|
: `Camera ${index + 1}`}
|
||||||
</Item>
|
</Item>
|
||||||
))}
|
))}
|
||||||
</SelectInput>
|
</SelectInput>
|
||||||
|
|
Loading…
Reference in a new issue