Open jindalashish opened 4 years ago
Is there a duration?
I have same problem too. And I get undefined
duration.
EDIT:
Even though I got undefined
duration, but I get the audio path, and I can play the recorded audio.
I tried it with react-native-sound and I can play the audio.
Here is my snippet:
import Sound from "react-native-sound"
...
SoundRecorder.stop()
.then(function (result, duration) {
// you will get undefined duration here, but I think it's okay
console.log("stopped recording, audio file saved at: " + result.path + " , with duration: " + duration)
const sound = new Sound(result.path, "", (error) => {
if (error) {
console.log("Error", error)
}
sound.play()
})
})
SoundRecorder.start( SoundRecorder.PATH_CACHE + '/' + fileName + '.mp4', { quality: SoundRecorder.QUALITY_MAX, format : SoundRecorder.FORMAT_AAC_ADTS,
}
).then(function () {
console.log('started recording');
setAudioStatus('stop');
});
After stopping recording, it shows the file path but no file is saved on the specified path. I'm using PATH_CACHE for saving files. my fill path is:-file:///data/user/0/com.myapp/cache/test.mp4, but there is no file.
this issue only comes on android
@xoniersumit same issue with me. No file path created.
No error being shown on start and stop and all the permissions are granted to app. After stop recording it shows file path but no file is saved on specified path. I'm using PATH_CACHE for saving file.