@arcomito I was looking to do the same thing as you!
Here’s a workaround for now:
https://github.com/florentroques/expo-download-and-play-video-example/blob/master/enhancedAsset.js#L26-L92
(working with current Expo SDK 18, before any FileSystem API improvement/change)
How to use this workaround function:
https://github.com/florentroques/expo-download-and-play-video-example/blob/master/App.js#L23-L53
It uses the undocumented FileSystem API behind the Asset API (inspired by @astonm’s code i found on github which put me on the way)
The issue was that with the downloadAsync function in Asset, you need the md5 hash of the file beforehand. But with a remote file, you don’t have it by default, unless you calculated it before!
So i created a downloadAsync alternative version without hash.
Expo demo app: https://expo.io/@florentroques/expo-download-and-play-video
Demo app’s code: https://github.com/florentroques/expo-download-and-play-video-example
I’m open to any improvement, suggestion etc!
3 Likes
Some websites can also help you to download videos online, such as keepvid, catchvideo, videograby, etc.
You can find many sites for downloading videos and their information there: The Best Sites to Download Videos and Music Efforlessly. It;s a good method to play the videos you like offline.