I am currently using getUserMedia()
, which is only working on Firefox and Chrome, yet it got deprecated and works only on https (in Chrome). Is there any other/better way to get the speech input in javascript that works on all platforms?
E.g. how do websites like web.whatsapp.com app record audio? getUserMedia()
prompts first-time-users to permit audio recording, whereas the Whatsapp application doesn't require the user's permission.
The getUserMedia()
I am currently using looks like this:
navigator.getUserMedia(
{
"audio": {
"mandatory": {
"googEchoCancellation": "false",
"googAutoGainControl": "false",
"googNoiseSuppression": "false",
"googHighpassFilter": "false"
},
"optional": []
},
}, gotStream, function(e) {
console.log(e);
});
https
AFAIK. Firefox still supportsgetUserMedia
inhttp
for what it's worth. – Whallonhttps://web.whatsapp.com/
itself doesn’t let you record audio; instead, the WhatsApp native mobile app does. And the reason the WhatsApp native mobile app doesn’t prompt first-time-users to permit microphone access is because users already granted that permission to it when they installed it. And since there’s no separate “install” step for Web apps, they have to prompt for permission at least the first time a user uses the Web app. – Niagara