Skip to content

Audiobooks replace the Listen area - #185

Merged
ZeeshanAdilButt merged 3 commits into
mainfrom
feat/audiobooks
Nov 6, 2026
Merged

ZeeshanAdilButt merged 3 commits into
mainfrom
feat/audiobooks

Conversation

@ZeeshanAdilButt

Copy link
Copy Markdown
Member

The Listen area becomes Audiobooks: the same narrated courses, presented and played like a book.

What changes

  • Rename: Audiobooks in the nav, area tabs, /learn hub and landing showcase. /listen and /listen/* redirect (308) to /audiobooks.
  • Shelf (/audiobooks): every course with a narration manifest as a book, grouped by category, with total length and progress per book. Continue listening comes first once something has been started, with a one-tap resume.
  • Book page (/audiobooks/<course>): cover, author (Zeeshan Adil), length, parts and chapters, a big Play / Resume / Listen again button, time left, and a track list grouped by part with durations and finished / in-progress marks. Chapter and part titles come from the public course outline.
  • Covers: drawn as SVG from the title, subtitle (after the colon), category and author on the Edorax palette, with a shape picked from the course slug. No stock art. The same SVG, turned into a PNG, is the lock-screen artwork.
  • Player: one provider in the root layout, so audio keeps playing across pages. A mini player sits above the phone tab bar and beside the desktop sidebar and expands to a full player: skip back 15 s / forward 30 s, 0.75x to 2x, sleep timer (minutes or end of chapter), chapter list, auto-advance, Media Session for lock-screen and headphone controls. It and the chapter reader's Listen player pause each other.
  • Saved place: per chapter and per book in localStorage (guarded with try/catch). There is no listening-progress model on the server, so it is per device for now. It also writes the reader player's key, so the two players resume each other.

No audio is generated; it reads the existing manifests on audio.edorax.com (5 min revalidate).

Checked

  • Preview on 127.0.0.1 against the live catalog: 17 books, 700 chapters. Played Collaboration and Decision-Making: resume from saved second, auto-advance to the next chapter with the finished one marked, skip 15/30, 1.5x saved across reloads, sleep timer counting down, Media Session title/author/artwork set, playback continuing across client navigation, switching books saving the first book's place.
  • Phone (375 px) and desktop: shelf, book page, mini player, full player and its chapter list; no horizontal scroll. Mini player position checked against a simulated learner tab bar (flush above it) and the 240 px desktop sidebar.
  • tsc --noEmit clean; new unit tests in tests/unit/lib/audiobooks.test.ts pass; full vitest suite passes.

Not covered

  • Signed-in learner shell not rendered end to end (no local account against production); positions were checked with the same CSS hooks.

Each narrated course becomes a book: tracks from the numbered manifest
files, part and chapter titles from the public course outline, a cover
drawn as SVG from the title and category, and the listening state kept
per chapter in localStorage (there is no listening-progress model on the
server yet).
The provider lives in the root layout, so audio keeps playing between
pages. A mini player sits above the phone tab bar and beside the desktop
sidebar and opens a full player: skip back 15s and forward 30s, 0.75x to
2x, sleep timer, chapter list, auto-advance and lock-screen controls. The
chapter reader's Listen player and this one pause each other.
A shelf of narrated courses with Continue listening first, and a page per
book with a resume button, time left and a track list grouped by part.
/listen redirects to /audiobooks.
@ZeeshanAdilButt
ZeeshanAdilButt merged commit 2f7a1c2 into main Nov 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant