From 2834a20505b0d22624dd2d64a4f8893133582049 Mon Sep 17 00:00:00 2001 From: Stefano Brilli Date: Fri, 10 Apr 2020 16:44:06 +0200 Subject: [PATCH] Make sure user gave permission on enumerateDevices --- src/components/dump-dialog.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/dump-dialog.tsx b/src/components/dump-dialog.tsx index b0d09f4..d501837 100644 --- a/src/components/dump-dialog.tsx +++ b/src/components/dump-dialog.tsx @@ -79,6 +79,7 @@ export const DumpDialog = ({ trackIndexes }: { trackIndexes: number[] }) => { useEffect(() => { async function updateDeviceList() { + await navigator.mediaDevices.getUserMedia({ audio: true }); let devices = await navigator.mediaDevices.enumerateDevices(); let inputDevices = devices .filter(device => device.kind === 'audioinput')