forked from akai/readest
fix(tts): also show highlight when navigating in paused mode and improve abbreviations processing (#3396)
Closes #3317.
This commit is contained in:
@@ -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) {
|
||||
|
||||
+1
-1
Submodule packages/foliate-js updated: 53a914894a...544a867a4d
Reference in New Issue
Block a user