In React native app, I have used to record audio but it is not stopping the recorder when i use setSubscriptionDuration on start.
player is increasing with +50. to solve this I have used setSubscriptionDuration but UI is hanged and not able to stop the recording. touch on any button is not working.
const onStartRecord = async () => {
audioRecorderPlayer.setSubscriptionDuration(0.1);
setIsAudioClicked(true);
await audioRecorderPlayer.startRecorder();
audioRecorderPlayer.addRecordBackListener((e: any) => {
setRecordSecs(e.currentPosition);
setRecordTime(audioRecorderPlayer.mmssss(Math.floor(e.currentPosition)))
});
};
const onStopRecord = async () => {
setIsAudioClicked(false);
const audio = await audioRecorderPlayer.stopRecorder();
audioRecorderPlayer.removeRecordBackListener();
setRecordSecs(0);
};
Please help to stop the recorder.
In React native app, I have used to record audio but it is not stopping the recorder when i use setSubscriptionDuration on start.
player is increasing with +50. to solve this I have used setSubscriptionDuration but UI is hanged and not able to stop the recording. touch on any button is not working.
Please help to stop the recorder.