From 22189f184ea1a062e24b4f6f426a4cf8edf87a98 Mon Sep 17 00:00:00 2001 From: John Factotum <50942278+johnfactotum@users.noreply.github.com> Date: Thu, 26 Sep 2024 12:37:06 +0800 Subject: [PATCH] EPUB: fix media overlay playback For some reason `canplaythrough` is firing more than once --- epub.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epub.js b/epub.js index f63bc15..cc6a6c3 100644 --- a/epub.js +++ b/epub.js @@ -486,7 +486,7 @@ class MediaOverlay extends EventTarget { audio.volume = this.#volume audio.playbackRate = this.#rate audio.play().catch(e => this.#error(e)) - }) + }, { once: true }) } async start(sectionIndex, filter = () => true) { this.#audio?.pause()