whilst trying to implement the 25 + 5 challenge, I got caught up by nasty bug.
its like this.
The challenge requires that the clock must have a warning system that is triggered when timer ends, specifically it requires a buzzer. I am using the
new Audio() api to generate the audio. when ever timer reaches zero, i invoke the
play() method and when reset, the
pause() and rewind the track using
currentTime = 0. Seems straight forward. When I run the FCC test bundle. I get an error like this.\n
ncaught (in promise) DOMException: The play() request was interrupted by a call to pause().
here is the the link to challenge pen
You are not binding
I have updated the pen but still having the same error
Looking better, but there are still 2 major issues that could be causing this.
You are still assigning a promise to
this.playPromise in the App component but not binding it to the instance.
You are not properly creating a ref within the App component for the audio element. You are also not forwarding the ref to the child properly
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.