React Native 使用 react-native-audio-toolkit 如何访问文件

React Native using react-native-audio-toolkit how to access files

所以我可以用下面的代码记录一些东西

let rec = new Recorder("filename.mp4").record();

// Stop recording after approximately 3 seconds
setTimeout(() => {
  rec.stop((err) => {
    // NOTE: In a real situation, handle possible errors here
    // Play the file after recording has stopped
    new Player("filename.mp4")
      .play()
      .on('ended', () => {
        // Enable button again after playback finishes
        this.setState({disabled: false});
      });
  });
}, 3000);

我可以完美地录制音频,但我如何访问或删除或列出录制的文件,如 filename.mp4。这保存在 Android 或 iOS 的什么地方?这些会在每次更新应用程序或每次重新编译等后保留在那里吗?

根据react-native-audio-toolkit documentation可以得到文件路径 fsPath 属性.

fsPath - String (read only)

Get the filesystem path of file being recorded to. Available after prepare() call has invoked its callback successfully.