How should we handle when SpeechSynthesis is not available?
Nessuno ha ancora preso questa issue.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
I found that it felt sketchy to have a getSynth() that could return null on a platform that doesn't support speech synthesis. We have some support for that case, but I think we rely on assertions a lot to guard against null pointer exceptions. In the wild, we wouldn't have assertions so we may want to be graceful. I added a couple of spots that checked if we had a synth before calling operations on it. Does this seem correct to you? I'd hate for the sim to break just because the platform doesn't have speech synthesis. For example, in the app, right?
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 an Error, 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.
- Lingua principale
- TypeScript
- Stelle
- 1
- Fork
- 5
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di phetsims/utterance-queue
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
phetsims/utterance-queue#125 ·
-
Remote service voices are causing problemsForse di nuovo libera @jessegreenberg l’ha presa 474 giorni fa e non c’è nessuna pull request aperta. Aperta
phetsims/utterance-queue#122 · 2 commenti · 1 assegnatario ·
-
Rename UtteranceQueue.addToBackForse di nuovo libera @jessegreenberg l’ha presa 501 giorni fa e non c’è nessuna pull request aperta. Aperta
phetsims/utterance-queue#121 · 1 assegnatario ·
-
Remove addToFrontForse di nuovo libera @jessegreenberg l’ha presa 501 giorni fa e non c’è nessuna pull request aperta. Aperta
phetsims/utterance-queue#120 · 1 assegnatario ·
-
dev:voicing type:i18n
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
phetsims/utterance-queue#119 · 1 commento ·
Tutte le issue di phetsims/utterance-queue
Issue simili
-
security-scan
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
[Studio feedback] 一轮对话的折叠Apertaenhancement from-studio
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
esengine/DeepSeek-Reasonix#12048 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
fix(data-lake): land GitHub callback failures on the lake instead of the home page (epic #3813)Apertabug data-lake github-integration UI/UX
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
test: pet colorsApertatestplan-item
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug claimable good first issue pillar/platforms
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
hurttlocker/o8#3277 ·
I maintainer di solito rispondono entro 1 giorno