This feature is still in our final beta round. If you’d like to get access to it as a beta tester, please send us an email at offlinemode@despia.com
Local CDN uses native OS background transfer APIs (NSURLSession on iOS, WorkManager on Android) with built-in retry. Start a download, close the app, get notified when ready.
Installation
API Reference
Write
Download and cache a remote file. Fire-and-forget - do not await.- Basic
- With Push
Read
Get metadata for cached files.Response Example
Response Example
Polling Pattern
Polling Pattern
Delete
Remove cached files.contentServerChange Callback
Called by native runtime when a download completes. This is where you get the file data.Callback Payload
Callback Payload
- When download completes (could be seconds or minutes later)
- When app reopens after background downloads completed
Response Schema
Background Downloads
Downloads continue when users close the app. Native OS handles retry on network failure.1
App reopens
Native finds pending items
2
Callback replayed
Calls
contentServerChange(item) for each completed downloadPlayback
Uselocal_cdn URL for offline playback:
HTTP Upload API
Only available when your app is served via Despia Local Server (not from origin/remote server).
React Hook
Environment Check
Test Videos
Free sample videos for testing Local CDN (CC licensed):Available Test Videos
Available Test Videos
Quick Test Script
Quick Test Script