Offline downloads, service worker, iOS audio unlock fix
build / check (push) Successful in 9s
build / image (push) Successful in 27s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 5.5 committed 2026-10-14 17:02:39 -04:00
1 parent 7f59c6d27b
commit 5f88ab891b
5 files changed
+186 -29

No files matched your search

+12
View File
@@ -32,3 +32,15 @@ PLAYER_PASSWORD=...
`docker compose up -d`, then sign in at port 8080. The default account is only created if it doesn't exist, so changing its password later with
`docker exec -it audiobook-player python server.py passwd nate` sticks. Add more people with `adduser`.
## Offline listening
Tap the ↓ on a book (or "Download" in the player) to save it on the device. Downloaded books show a ✓, and the
"Downloaded only" view lists them. They play with no connection to the server, and progress syncs when you're back online.
- Keep the app open while a download runs; iOS pauses pages in the background.
- The audio is stored in the browser (IndexedDB). iOS counts it against the site's storage quota, which is much larger
once the site is added to the Home Screen.
- **To open the app itself offline, serve it over HTTPS.** Browsers only allow the service worker (`sw.js`) on secure
origins. Put a reverse proxy with a certificate in front of port 8080 (and a domain name). Over plain HTTP, downloads
still play but the page can't load without a connection.