How would one implement an internal local proxy server on a react native app the way Instagram does it for caching?

Viewed 102

This article is an interesting read on how the Instagram app handles video cache.

https://instagram-engineering.com/improving-video-playback-on-android-2f6c6a0058d

I'm trying to implement a similar system on a Reddit clone I'm working on. I've been able to cache using the link and expo file system. I check if the video in a URL is cached and if not I simply send the original link back to the video player and download the video in the background. However, the problem is my method results in 2 requests. Which is definitely a waste. I need a way to download the video while also simultaneously streaming it to the video player component. Any help would be great. Thank you

0 Answers
Related