React native 使用react native fetch blob库读取应用程序中的缓存文件数据
我使用带有选项的库rn fetch blob下载了一个视频文件,因为缓存是真的。我从下面的代码中获得了文件夹的路径。但是我如何获取和播放视频(我不使用下载管理器选项或文件路径)React native 使用react native fetch blob库读取应用程序中的缓存文件数据,react-native,react-native-fetch-blob,rn-fetch-blob,React Native,React Native Fetch Blob,Rn Fetch Blob,我使用带有选项的库rn fetch blob下载了一个视频文件,因为缓存是真的。我从下面的代码中获得了文件夹的路径。但是我如何获取和播放视频(我不使用下载管理器选项或文件路径) `RNFetchBlob .config({ // add this option that makes response data to be stored as a file, // this is much more performant. fileCache : true, })
`RNFetchBlob
.config({
// add this option that makes response data to be stored as a file,
// this is much more performant.
fileCache : true,
})
.fetch('GET', 'http://www.example.com/file/example.mp4', {
//some headers ..
})
.then((res) => {
// the temp file path
console.log('The file saved to ', res.path())
})`