'Play from base64 string in react-native-audio-recorder-player
I need to play audio from base64 encoded string in react-native using react-native-audio-recorder-player by either converting to file or directly playable
Solution 1:[1]
I used below code to write new file with RNFS (react-native-fs) and react-native-audio-recorder-player to play the song from path uri.
const path = `${RNFS.DocumentDirectoryPath}/${i}.aac`;
RNFS.writeFile(path, question.file, 'base64').then(() => startPlayer(path))
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Sivamani V |
