summaryrefslogtreecommitdiff
path: root/ext/js/pages/settings/audio-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/pages/settings/audio-controller.js')
-rw-r--r--ext/js/pages/settings/audio-controller.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/js/pages/settings/audio-controller.js b/ext/js/pages/settings/audio-controller.js
index e62383a8..6b1ce0b5 100644
--- a/ext/js/pages/settings/audio-controller.js
+++ b/ext/js/pages/settings/audio-controller.js
@@ -39,9 +39,7 @@ class AudioController {
this._audioSourceAddButton.addEventListener('click', this._onAddAudioSource.bind(this), false);
- if (typeof speechSynthesis !== 'undefined') {
- speechSynthesis.addEventListener('voiceschanged', this._updateTextToSpeechVoices.bind(this), false);
- }
+ this._audioSystem.on('voiceschanged', this._updateTextToSpeechVoices.bind(this), false);
this._updateTextToSpeechVoices();
document.querySelector('#text-to-speech-voice-test').addEventListener('click', this._onTestTextToSpeech.bind(this), false);