Skip to content

Polyfill browser support detection

Compare
Choose a tag to compare
@JamesBrill JamesBrill released this 11 Jun 14:07
· 27 commits to master since this release
c0228b7

Response to issue #100

browserSupportsSpeechRecognition will no longer always return true when polyfills are used, and will now return false on browsers that do not support the APIs required for Speech Recognition polyfills (namely Internet Explorer and a handful of old browsers).

Another new behaviour is that if an implementation of Speech Recognition is already listening to the microphone at the moment when a polyfill is applied, it will be disconnected from react-speech-recognition and turned off first. This is to avoid multiple recognisers running at the same time. In practice, this shouldn't happen if consumers ensure the polyfill is applied before any "start listening" buttons are rendered.