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);
})
navigator.userAgent
instead. Otherwise, I am pretty surenavigator.mediaDevices.getUserMedia
is a function offered by Chrome (and Firefox, and some other user agents as per one or the other standardized Web API). – Paestum