feat(audio): Audio engine — low-TTFB preload + offline-resilient playback #54
No reviewers
Labels
No labels
backend
bug
completed
documentation
duplicate
enhancement
feature
frontend
good first issue
help wanted
in-progress
invalid
performance
phase-1
Phase1
Phase2
Phase3
planning
question
refactor
security
test
testing
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Kalle/ATM!54
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/audio-engine"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Plan
Deliver the Core Platform "Audio engine (preload, low-TTFB, offline-resilient)" roadmap item — a client-side audio engine that preloads lesson audio into an in-memory + Cache API store so the first "play" is instant and playback survives a network blip mid-lesson, without ever surfacing buffering as strain or judgement.
Outcome
src/lib/audio-engine.ts(new): URL resolution against the base CDN,preloadAudio(in-memory dedupe + Cache API persistence),loadAudioResilient(cache-first recovery),fetchWithTtfb(TTFB measurement), and idempotent request coalescing (concurrent preloads of the same URL share one network fetch).src/components/AudioPlayer.tsx(wired): a preloaduseEffectfeeds a preloaded blob URL to the<audio>element;<audio preload>bumpedmetadata→auto. Graceful fallback to the original network src on any preload failure.Impact on release goals
[ ]→[x](roadmap updated on this branch).Blackbox
python3 scripts/blackbox_test.py --target testing→ 7/8 greenGET /api/lessonsJSON shape) is pre-existing and tracked by PR #53; it is a server-side issue unrelated to this client-side audio work.tsc --noEmit).Six-perspectives check
Risk
src, so there is no regression to current playback.Checklist
dev(feat/audio-engine).development/patchlog.md).development/roadmap.md)Note: the Tauri build CI job can take >15 min. This PR is opened for review; CI status will populate asynchronously.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.