kevinresol / react-native-sound-recorder

Simplest Sound Recorder for React Native
MIT License
119 stars 36 forks source link

File not found after stop recording on real device #43

Open jindalashish opened 4 years ago

jindalashish commented 4 years ago

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.

kevinresol commented 4 years ago

Is there a duration?

irzan2010 commented 3 years ago

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()
        })
    })
rasheedk commented 3 years ago

SoundRecorder.start( SoundRecorder.PATH_CACHE + '/' + fileName + '.mp4', { quality: SoundRecorder.QUALITY_MAX, format : SoundRecorder.FORMAT_AAC_ADTS,

    }
  ).then(function () {
    console.log('started recording');
    setAudioStatus('stop');
  });
xoniersumit commented 2 years ago

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

Srijan67 commented 1 year ago

@xoniersumit same issue with me. No file path created.