Hi! in my loadAssetsAsync function, I need to prefetch videos too. Videos of my app are really small, but need to be prefetch.
Currently my code looks like this:
loadAssetsAsync = async () => {
const videos = _.merge(routineVideos); // routineVideos: array of key => require() videos...
const cacheVideos = _.map(videos, video => {
if (typeof video === 'string') {
return Video.prefetch(video); // Does Video.prefetch exists?
}
return Asset.fromModule(video).downloadAsync();
});
const fonts = [MaterialCommunityIcons.font];
const cacheFonts = fonts.map(font => Font.loadAsync(font));
await Promise.all([...cacheVideos, ...cacheFonts]);
};
Is there something similar to Image.prefetch but for videos?
Thanks!