Context
The ed-tech company sells video courses that must be protected. I was the primary engineer making DRM playback work in the React Native app on Android and iOS, from 2025 to 2026.
The problem
Web had DRM, but the mobile app did not have online playback, offline playback and downloads working together on both platforms.
What I did
On Android I made Widevine work for online playback, offline playback and downloads inside React Native.
On iOS I did the same with FairPlay. For offline FairPlay I added a plain-HTTP loopback listener so the system player can read HLS from the local proxy.
I added a fallback for a chipset whose secure decoder crashed, and pinned the local proxy certificate instead of trusting any.
I turned on screen-capture protection, including full screen.
I added download UX: progress, speed, disk-space check and retry with backoff.
Key decision
I played protected video through a local proxy in native code, so one design could cover both platforms.
The cost was a more complex stack, with extra failure modes such as dead sockets after suspend.
Result
Widevine and FairPlay now play online, offline and from downloads in the React Native app.
What I learned
I would test offline start and suspend and resume from day one. Several late bugs were in those paths.
Stack
- React Native
- Widevine
- FairPlay
- ExoPlayer
- HLS
- C
