i wanna leave page but when i do it throws this error however everything works correctly!
here is my code:
const repeat = useCallback(() => {
const time = audioRef.current.currentTime;
setTimeProgress(time);
progressRef.current.value = (time / duration) * 100;
playAnimationRef.current = requestAnimationFrame(repeat);
}, [audioRef, progressRef, duration]);