summaryrefslogtreecommitdiff
path: root/ext/js/pages/settings/audio-controller.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-04-10 23:55:11 -0400
committerGitHub <noreply@github.com>2021-04-10 23:55:11 -0400
commit20d60a2ba79c065586805806ea703a8057839f75 (patch)
tree3043090e118e03a8e276d2a7f1557e525ac23239 /ext/js/pages/settings/audio-controller.js
parentb23c4bff4bf319ea79eea0d025e21eb19e6dcd68 (diff)
Initial safari compatibility (#1609)
* Update environment info to return the 'safari' browser * Fix popup display on Safari * Update environment assignment * Add data-loading-stalled property when loading takes longer than expected * Add notification when loading has stalled * Allow getDictionaryInfo invocation on non-privileged contexts * Update _validatePrivilegedMessageSender * Don't listen to 'voiceschanged' event unless addEventListener is present Also expose an event
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);