We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b26cde2 commit 0d4a92aCopy full SHA for 0d4a92a
1 file changed
view.js
@@ -577,12 +577,12 @@ export class View extends HTMLElement {
577
for (const item of list) this.deleteAnnotation(item)
578
this.#searchResults.clear()
579
}
580
- async initTTS(granularity = 'word') {
+ async initTTS(granularity = 'word', highlight) {
581
const doc = this.renderer.getContents()[0].doc
582
if (this.tts && this.tts.doc === doc) return
583
const { TTS } = await import('./tts.js')
584
- this.tts = new TTS(doc, textWalker, range =>
585
- this.renderer.scrollToAnchor(range, true), granularity)
+ this.tts = new TTS(doc, textWalker, highlight || (range =>
+ this.renderer.scrollToAnchor(range, true)), granularity)
586
587
startMediaOverlay() {
588
const { index } = this.renderer.getContents()[0]
0 commit comments