Repository navigation
Audiobooks replace the Listen area - #185
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Listen area becomes Audiobooks: the same narrated courses, presented and played like a book.
What changes
/learnhub and landing showcase./listenand/listen/*redirect (308) to/audiobooks./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./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.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
tsc --noEmitclean; new unit tests intests/unit/lib/audiobooks.test.tspass; full vitest suite passes.Not covered