JamesBrill / react-speech-recognition

💬Speech recognition for your React app
https://webspeechrecognition.com/
MIT License
637 stars 116 forks source link

isMicAvailable does not work as expected #168

Open JayPe69 opened 1 year ago

JayPe69 commented 1 year ago

I understand this option as : Can we start listening safely, we are sure the microphone is available.

By default in the code, the boolean is true. However, if it's the first time the user visit the website, he'll get a browser permission popin saying, do you want to access your mic. So my guess is that it should be false by default.
Then when starting listening, the permission comes, if the user accept, then the boolean should be true, if the user deny, the boolean should stay false.

I don't know if I'm right, but currently, I cannot use the isMicrophoneAvailable, because it does not take into consideration the browser permission.

Thanks for your time and your help.