Make sure user gave permission on enumerateDevices
This commit is contained in:
parent
c606d78753
commit
2834a20505
|
@ -79,6 +79,7 @@ export const DumpDialog = ({ trackIndexes }: { trackIndexes: number[] }) => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
async function updateDeviceList() {
|
async function updateDeviceList() {
|
||||||
|
await navigator.mediaDevices.getUserMedia({ audio: true });
|
||||||
let devices = await navigator.mediaDevices.enumerateDevices();
|
let devices = await navigator.mediaDevices.enumerateDevices();
|
||||||
let inputDevices = devices
|
let inputDevices = devices
|
||||||
.filter(device => device.kind === 'audioinput')
|
.filter(device => device.kind === 'audioinput')
|
||||||
|
|
Loading…
Reference in New Issue