Im trying to enable microphone to allow user record audio, but I get this error:
Uncaught TypeError: Cannot read property 'getUserMedia' of undefined at activateMicrophone
navigator.mediaDevices.getUserMedia({audio: true, video:false})
.then(stream => {
handlerFunction(stream, $audioSelect.siblings(".recordedAudio"));
$(".record").prop("disabled", false);
})
Restart your Chrome browser, then re-open Chrome microphone settings (chrome://settings/content/microphone) and toggle back on 'Ask before accessing', as shown below.
Grabbing navigator.mediaDevices
as of Chrome 74 requires a secure context.
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/mediaDevices
This means that non https://
requests will return an undefined object.
For more information on this change: https://w3c.github.io/mediacapture-main/#local-content
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With