hyochan/react-native-audio-recorder-player

Stop and pause player not working

parthpanchalTAI opened this issue · 4 comments

const audioRecorderPlayer = new AudioRecorderPlayer();

const onPausePlay = async () => {
await audioRecorderPlayer.audioRecorderPlayer.pausePlayer();
};

const onStopPlay = async () => {
console.log('onStopPlay');
await audioRecorderPlayer.stopPlayer();
audioRecorderPlayer.removePlayBackListener();
};

This two methods are not working, audio is continuous play on background, in both android and ios

same here

@parthpanchalTAI when I add 'Background processing' to the my project, it seems working fine but it's still not stable. 2-3 sessions working fine but some it's not. Before adding this, it was not working at all.

Screenshot 2024-02-22 at 09 13 14

Hi @saribalorhan @parthpanchalTAI, Please make sure you defined the constant of audio player outside the component.

import....

const audioRecorderPlayer = new AudioRecorderPlayer();

const App()=>{}

Hi @saribalorhan @parthpanchalTAI, Please make sure you defined the constant of audio player outside the component.

import....

const audioRecorderPlayer = new AudioRecorderPlayer();

const App()=>{}

still issue , exist , sometimes not able to stop recording