We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useEffect(() => { const audio = new Audio(playList); const timeUpdateHandler = () => { setCurrentTime(audio.currentTime); setRatio((audio.currentTime / audio.duration) * 100); if (audio.duration === audio.currentTime) { setPlaying(false); } }; if (playing) { audio.play().then(() => { audio.addEventListener("timeupdate", timeUpdateHandler); }); } else { audio.pause(); audio.removeEventListener("timeupdate", timeUpdateHandler); } return () => { audio.pause(); audio.removeEventListener("timeupdate", timeUpdateHandler); }; }, [playing, playList, setPlaying]);
페이지를 벗어나면 음악이 정지 됩니다.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
2023-08-08.8.11.37.mov
페이지를 벗어나면 음악이 정지 됩니다.
The text was updated successfully, but these errors were encountered: