aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/js/audio-system.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-04-17 17:48:55 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-04-18 14:23:34 -0400
commitfcbfde506abf6ca3474d2dfdf4f337b86b0bb579 (patch)
treecd1103883022a3feb48225347f02eb121c5a120e /ext/mixed/js/audio-system.js
parent9fe7b9ad29958b148162bfc2d065a7e32a986291 (diff)
Await and handle errors from audio.play()
Diffstat (limited to 'ext/mixed/js/audio-system.js')
-rw-r--r--ext/mixed/js/audio-system.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mixed/js/audio-system.js b/ext/mixed/js/audio-system.js
index 94885d34..3273f982 100644
--- a/ext/mixed/js/audio-system.js
+++ b/ext/mixed/js/audio-system.js
@@ -40,7 +40,7 @@ class TextToSpeechAudio {
}
}
- play() {
+ async play() {
try {
if (this._utterance === null) {
this._utterance = new SpeechSynthesisUtterance(this.text || '');