fix(tts): also show highlight when navigating in paused mode and improve abbreviations processing (#3396)

Closes #3317.
This commit is contained in:
Huang Xin
2026-02-27 13:46:27 +08:00
committed by GitHub
parent 6ad549d13c
commit 2bd54ac236
2 changed files with 11 additions and 2 deletions
@@ -213,7 +213,16 @@ export class TTSController extends EventTarget {
}
async #handleNavigationWithSSML(ssml: string | undefined, isPlaying: boolean) {
if (isPlaying) this.#speak(ssml);
if (isPlaying) {
this.#speak(ssml);
} else {
if (ssml) {
const { marks } = parseSSMLMarks(ssml);
if (marks.length > 0) {
this.dispatchSpeakMark(marks[0]);
}
}
}
}
async #handleNavigationWithoutSSML(initSection: () => Promise<boolean>, isPlaying: boolean) {