diff --git a/web/src/audio.ts b/web/src/audio.ts index 24ad83ec..c705b197 100644 --- a/web/src/audio.ts +++ b/web/src/audio.ts @@ -323,6 +323,11 @@ Alpine.data("audioReader", () => ({ const audio = this.audio(); if (audio && !audio.getAttribute("src") && this.tracks[0]) { audio.setAttribute("src", this.tracks[0].url); + // Setting src resets playbackRate to the element default — + // re-apply, mirroring the seekTo() src-swap path. Without this + // the pill said 1.5× while audio actually played at 1× after + // every reload (surfaced by the speed-list browser check). + audio.playbackRate = this.speed; } } if (progress.ok) { @@ -351,6 +356,7 @@ Alpine.data("audioReader", () => ({ if (audio && !audio.getAttribute("src") && this.fileUrl) { this.tracks = [{ url: this.fileUrl, start: 0, end: 0 }]; audio.setAttribute("src", this.fileUrl); + audio.playbackRate = this.speed; } } },