feat: Add offline media download pipeline and vertical video player feed - #13
DriftyPencil wants to merge 1 commit into
Conversation
Holding as experimental — not for beta/main yetThanks for the substantial contribution, @DriftyPencil. The architecture is solid — vertical But this PR is being held as experimental for now. I created a tracking branch at Why not merge yet1. Backend storage growth is unbounded (the big one)
What's needed before this lands:
Without this, running the beta image in production for a week is a disk-fill waiting game. 2. No backend tests for the new endpointOnly
These are easy to add and should be required for an endpoint that streams user-uploaded files. 3. No client tests for the new components
4.
|
5bddfeb to
f682936
Compare
This PR introduces a comprehensive offline media asset-management pipeline, enabling the application to download, store, sync, and play physical media (.mp4) locally on mobile devices without an active network connection.
Key Architectural Changes
1. Backend Extensions (
/backend)Instagrapi/yt-dlp) to fetch and save raw physical .mp4 payloads into a dedicated local server directory (/media).local_filenameandmedia_file_sizetracking./api/v1/media/{filename}to serve files to client devices.2. Mobile App Sync & Caching (
/superbrain-app)expo-file-systemto fetch assets over network handshakes and commit them directly toFileSystem.documentDirectory.local_urifile paths alongside existing post metadata.3. UX & Offline Playback Componentry
FlatListwith strictviewabilityConfigperformance tunings (windowSize={3}) to handle full-screen media recycling without memory leaks.local_urimapping. It seamlessly switches playback to thefile://scheme when offline, dropping back to the remote network URL only as a backup.Verification & Testing