Scenario pain point analysis
Scenarios such as subways suffer from unstable networks and intermittent signals, which affect the audio streaming experience. The following is a multi-layer solution:
Technical response
- Preloading mechanism::
- Setting up the 'Morning Auto Download' feature on mobile (modifying app/scheduler.js)
- Caching the last 5 audios with Service Worker (configuring the next-pwa plugin)
- fault tolerance::
- Enable offline persistence for Firestore (refer to deployment.md chapter 4)
- Download audio in segments (cut by 10 minutes, see src/player.js)
User's Guide
Three steps to enhance the experience:
- Enable 'Edge Acceleration' in Netlify console (requires upgrade to Pro package)
- Restrict Audibit to use only WiFi preload in cellular settings (iOS in cellular options settings)
- Priority is given to short messages <2MB (achieved through the article word count filtering function)
Special note: React Native apps need to additionally configure the react-native-offline plugin to handle network state changes.
This answer comes from the articleAudibit: turning popular tech articles into ready-to-listen audio podcastsThe