Cannot access microphone when open link website from facebook

30 Views Asked by At

https://i.stack.imgur.com/cpSK7.png

const mediaDevices = navigator.mediaDevices || (navigator as any).webkitMediaDevices || (navigator as any).mozMediaDevices ||
    (navigator as any).msMediaDevices;
if (mediaDevices) {
    navigator.mediaDevices
        .getUserMedia({ audio: true })
            .then((stream: MediaStream) => {
                // next todo
            })
    .catch((error: any) => {
        onStartRecording(false);
        toast.error("Cannot access microphone");
    });

I use this code, it work in gg, tele, edge ... but when I open website from facebook after start record show Cannot access microphone

I want record audio when open website from facebook

0

There are 0 best solutions below