Timer works fine, but it seems like my timer skips 00:00 and goes straight to “break”, or “session”, and then plays the audio tag. Not sure how to work around this.
When the break timer reaches 00:00, the audio element has to be triggered
And also timer cycle has to be repetitive, the timer don’t have to stop itself, and when break timer is completed it has to start the cycle from the session again automatically
When timer is passed somewhere in middle, for example 24:57 and we increment the session, the timer has to set the same value that the session has. For example if timer time is 24:57 and session time is 25, when we increment this it has to go to 26:00 not 26:57. You have to reset the seconds to 00 whenever you are incrementing/ decrementing the time.
When the break timer reaches 00:00, the audio element has to be triggered
Does it not already do that?
And also timer cycle has to be repetitive, the timer don’t have to stop itself, and when break timer is completed it has to start the cycle from the session again automatically
Yeah I’m pretty sure I already have that.
When timer is passed somewhere in middle, for example 24:57 and we increment the session, the timer has to set the same value that the session has. For example if timer time is 24:57 and session time is 25, when we increment this it has to go to 26:00 not 26:57. You have to reset the seconds to 00 whenever you are incrementing/ decrementing the time.
So I did that on purpose. I tried emulating the behavior of the timer that’s listed as an example on the assignment page, and it had this behavior. Also when I remove the timeout I get an audio error(#1)
And also timer cycle has to be repetitive, the timer don’t have to stop itself, and when break timer is completed it has to start the cycle from the session again automatically
Did a bit more testing, running the test bundle locally results in me passing 26/29 tests, while on codepen it only passes 24/29. Still, even on my local machine tests 12, 13, and 15 won’t pass.