jkyoo82

Results 2 comments of jkyoo82

audioRecorderPlayer.addPlayBackListener(async e => { let position = e.currentPosition; let duration = e.duration; setPlayTime(position); setDurationTime(duration); // progress bar let cale = (position / duration) * (scaleWidth * 260); setProgress(cale); if (position...

const onStopPlay = useCallback(async () => { if (audioRecorderPlayer?._isPlaying) { audioRecorderPlayer.stopPlayer(); audioRecorderPlayer.removePlayBackListener(); setIsPlaying(false); setPlayTime(0); setProgress(0); } }, [audioRecorderPlayer]); useEffect(() => { return () => { if (isPlaying) { console.log('onStop'); onStopPlay();...