JudahGabriel / Chavah

Chavah Messianic Radio is the very best Messianic Jewish and Hebrew Roots music on the web.
https://messianicradio.com
MIT License
8 stars 3 forks source link

Offline support #104

Open JudahGabriel opened 4 years ago

JudahGabriel commented 4 years ago

Step 1: It's fairly easy to make Chavah available offline by caching the shell (JS, CSS, HTML, shell images).

Step 2: We should also cache media files as users listen to them. The service worker should be updated to store media files (MP3s and album art) into a separate media cache. When requested from the CDN, we should load from the cache. (Stretch goal: coordinate caching these files with storage APIs to determine if caching it will succeed)

Step 3: If the user is offline, the UI should display a message saying we're offline, and telling the user they can only play previously-played songs. Disable song request button while offline.

JudahGabriel commented 4 years ago

Step 1 and 2 are now implemented.

JudahGabriel commented 3 years ago

Step 2 is partially broken on some browsers due to Range requests. Currently, if the browser issues a range request (even if for the full range!) the response is a 206, which cannot be cached. Caching then fails.

We should probably just bite the bullet and use workbox with range caching.