Hi, I have nearly managed to finish the pomodoro React challenge to pass but I am having issues with the audio section of the test. I can pass all of them except for one. If I add code which pauses and resets the running audio it prevents any audio playing at all. If I remove the code everything passes except the test requiring the audio to be reset if the user presses the reset button. I’ve tried code such as
if (document.getElementById(‘beep’)) {
document.getElementById(‘beep’).pause();
document.getElementById(“beep”).currentTime = 0;
}
which I can add to the handle rest function but as I said this just prevents any audio playing at all.
Here’s the codepen