cleaning up
This commit is contained in:
parent
5281c61f99
commit
89fe0f11ae
2 changed files with 19 additions and 9 deletions
|
|
@ -52,10 +52,17 @@ export function AudioDeviceSelector({ audioDeviceName, onChange }) {
|
|||
onChange(deviceName);
|
||||
deviceID && setAudioDevice(deviceID);
|
||||
};
|
||||
const options = new Set();
|
||||
|
||||
const options = new Map();
|
||||
Array.from(devices.keys()).forEach((deviceName) => {
|
||||
options.add({ id: deviceName, label: deviceName });
|
||||
options.set(deviceName, deviceName);
|
||||
});
|
||||
return <SelectInput options={options} onClick={onClick} value={audioDeviceName} onChange={onDeviceChange} />;
|
||||
return (
|
||||
<SelectInput
|
||||
options={options}
|
||||
onClick={onClick}
|
||||
placeholder="select device"
|
||||
value={audioDeviceName}
|
||||
onChange={onDeviceChange}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue