Open jessegreenberg opened 2 years ago
This makes sense. I would prefer an Error to an assertion given your thoughts, but I still worry about getting this in production, in a case that QA hasn't tested or we don't support. Is it worth such a hard fail if we forget about a device?
Currently the only platform that does not support SpeechSynthesis is Android in a WebView. So correct, this could come up in the Android app, and it has! https://github.com/phetsims/qa/issues/608
I think this should hard crash and that it is up to us to not make SpeechSynthesis requests unless we are confident the platform can handle it. I almost want to replace the assertion in
getSynth
with anError
, I want it to let us know loudly on platforms where we expect the synth to be available but is not.I can see both sides of the argument though. Lets talk more if you still prefer it to be graceful.