Fix TTS on iOS

I bet they serve apples in hell.
This commit is contained in:
Tetrakern 2023-07-09 23:57:51 +02:00
parent 4b4b2bdc5b
commit 88c0aff5da
2 changed files with 7 additions and 5 deletions

2
js/tts.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -31,10 +31,12 @@ if (typeof speechSynthesis !== 'undefined') {
}, 2000);
// If they support the event, we clear the timeout
fcn_synth.addEventListener('voiceschanged', () => {
fcn_setupTTS();
clearTimeout(fcn_ttsSetupTimeout);
}, { once: true });
if ('onvoiceschanged' in speechSynthesis) {
fcn_synth.addEventListener('voiceschanged', () => {
fcn_setupTTS();
clearTimeout(fcn_ttsSetupTimeout);
}, { once: true });
}
}
/**