Android 有没有办法在React Native中预取或缓存音频?

Android 有没有办法在React Native中预取或缓存音频?,android,react-native,caching,audio,Android,React Native,Caching,Audio,是否有任何方法可以在React Native中预取音频,或者是否有任何库允许我这样做 由于缺乏信息,我相信您是在问是否可以使用react native下载音频? 你可以用像 这将允许您将流保存到手机存储器中,为您提供手机上文件的路径,然后您可以将其保存以供以后重用 他们文档中的一个例子 RNFetchBlob.config({ // add this option that makes response data to be stored as a file, // this is much m

是否有任何方法可以在React Native中预取音频,或者是否有任何库允许我这样做

由于缺乏信息,我相信您是在问是否可以使用react native下载音频? 你可以用像 这将允许您将流保存到手机存储器中,为您提供手机上文件的路径,然后您可以将其保存以供以后重用

他们文档中的一个例子

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.zip', {
  //some headers ..
})
.then((res) => {
  // the temp file path
  console.log('The file saved to ', res.path())
})