Commit 6fe19760 authored by Randy Rossi's avatar Randy Rossi Committed by Commit Bot

onTtsEvent should null currentUtterance on tts error

onTtsEvent() should null out currentUtterance_ like 'interrupted'
and 'end' events do.  Otherwise, the call to startSpeakingNextItemInQueue_
will bail immediately since it thinks an utterance is still
speaking.

Bug: NONE
Test: cast on display assistant after TTS_EVENT_ERROR dispatched to chromevox
Change-Id: Iee5b35d763e526f85ace9d9bfcef85580ca61291
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2317986Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Commit-Queue: Randy Rossi <rmrossi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791960}
parent 12e6701b
...@@ -470,6 +470,7 @@ TtsBackground = class extends ChromeTtsBase { ...@@ -470,6 +470,7 @@ TtsBackground = class extends ChromeTtsBase {
break; break;
case 'error': case 'error':
this.onError_(event['errorMessage']); this.onError_(event['errorMessage']);
this.currentUtterance_ = null;
this.startSpeakingNextItemInQueue_(); this.startSpeakingNextItemInQueue_();
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment