EPUB: fix media overlay playback

For some reason `canplaythrough` is firing more than once
This commit is contained in:
John Factotum
2024-09-26 12:37:06 +08:00
parent e94b85ce09
commit 22189f184e
+1 -1
View File
@@ -486,7 +486,7 @@ class MediaOverlay extends EventTarget {
audio.volume = this.#volume audio.volume = this.#volume
audio.playbackRate = this.#rate audio.playbackRate = this.#rate
audio.play().catch(e => this.#error(e)) audio.play().catch(e => this.#error(e))
}) }, { once: true })
} }
async start(sectionIndex, filter = () => true) { async start(sectionIndex, filter = () => true) {
this.#audio?.pause() this.#audio?.pause()