react-native-audio-recorder-player icon indicating copy to clipboard operation
react-native-audio-recorder-player copied to clipboard

The currentPostion in addPlayBackListener is refreshed when the record is greater than 10 seconds.

Open mira1504 opened this issue 8 months ago • 5 comments

const onStartPlay = useCallback(() => { setPaused(false); audioRecorder.startPlayer(voiceRecord);

const playbackListener = (e: PlayBackType) => {
  setCurrentPositionSec(e.currentPosition);
  setCurrentDurationSec(e.duration);
  setPlayTime(e.currentPosition);
  setDuration(e.duration);

  if (e.currentPosition === e.duration) {
    onStopPlay();
  }
  return;
};

image

mira1504 avatar Oct 18 '23 04:10 mira1504

@hyochan , Hi , do you know what a reason?

mira1504 avatar Oct 18 '23 04:10 mira1504

Same issue any solution??

shahid-vorksol avatar Nov 01 '23 10:11 shahid-vorksol

Could you kindly tell the version you are using?

Also please use the latest version if you are not using it

hyochan avatar Nov 01 '23 11:11 hyochan

Same issue any solution??

Was having issue on Android simulator, works fine on actual device!

shahid-vorksol avatar Nov 01 '23 11:11 shahid-vorksol

Could you kindly tell the version you are using?

Also please use the latest version if you are not using it

I am using 3.5.1, as the new versions were causing app crashes.

shahid-vorksol avatar Nov 01 '23 11:11 shahid-vorksol