From 5cf34102d680f18089a80de7a712c242f8fa7ee8 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Thu, 15 Oct 2026 18:35:39 -0400 Subject: [PATCH] feat(audio player): canonical audiobook transports + dropdown settings + volume panel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Transport row is now the five-button audiobook shape the user asked for: previous-chapter · circular-skip-back (seconds displayed inside the ring) · play/pause · circular-skip-forward · next-chapter — the ring arrows are stroke SVGs (rotate-ccw/rotate-cw) with the number as an overlay so it stays upright and follows the skip setting. Settings strip collapses to four controls: Skip dropdown, Speed dropdown, Bookmark (capture popover unchanged), Volume. Volume opens a panel with a vertical dragger (writing-mode:rtl slider) and a mute/unmute button; the strip icon is dynamic — 1–3 arcs by level (low <34%, mid <67%, high) and crossed when muted or zero. Volume/mute persist in localStorage and restore with the element; unmute floors zero-volume to 50% so unmuting is audible. Verified on-device: dropdowns open upward with current value highlighted, mute flips both icons to the crossed state, slider drag changes arc count, chapter buttons jump (pill → 15/34) and the caption tracks the drawer's chapter labels. --- templates/audio_reader.templ | 208 +++++++++++++++++++++++++++----- templates/audio_reader_templ.go | 2 +- web/src/audio.ts | 53 ++++++++ 3 files changed, 231 insertions(+), 32 deletions(-) diff --git a/templates/audio_reader.templ b/templates/audio_reader.templ index 837710c6..17cf52a3 100644 --- a/templates/audio_reader.templ +++ b/templates/audio_reader.templ @@ -117,15 +117,35 @@ templ AudioReader(user User, metadata ReaderMetadata) { /> 0:00 -
+
+
- -
-
- Skip -
+ +
+
+ +
-
- Speed -
-