You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There’s no DOM access from a Service Worker, but the HTTP Accept header might be useful, thou it has to be checked if it can be used when building the request (and not when intercepting it) during the caching process.
Let the app communicate to the Service Worker what’s the supported format, and even let the app send the list of audio files to cache to the Service Worker at request time. As additional benefit, there should be no need to update the Service Worker in order to request an update of audio files and the update flow would be:
Service Worker says “I’m ready” to the app.
The app says “thanks, here are the audio files I need” (with the right format) to the Service Worker.
The Service Worker checks which files are not cached yet, and cache them.
The text was updated successfully, but these errors were encountered:
Depending on the audio capabilities of the device, people might be served FLAC (prefered) or WAV (fallback) sounds.
burokku/src/js/modules/Block/config.js
Line 17 in 96827e0
However, in the Service Worker cache, the app only caches FLAC.
burokku/src/js/service-worker.js
Lines 18 to 23 in 96827e0
It could be great to cache the supported type.
Proposed approaches:
The text was updated successfully, but these errors were encountered: