0

所以我可以記錄與下面的代碼的東西陣營本地使用反應 - 原生音頻工具如何訪問文件

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中保存在哪裏?在每次更新應用程序或每次重新編譯之後,它們都會保留在那裏。

回答

0

根據react-native-audio-toolkit documentation,您可以使用fsPath屬性獲取文件parth。

fsPath - 字符串(只讀)

獲取文件的文件系統路徑被記錄到。在()調用 之後可用,已成功調用其回調函數。