Sayali: resolve Firefox timer not stopping and audio not playing#5279
Open
sayali-2308 wants to merge 3 commits into
Open
Sayali: resolve Firefox timer not stopping and audio not playing#5279sayali-2308 wants to merge 3 commits into
sayali-2308 wants to merge 3 commits into
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Fixes Firefox Timer Bug (Priority Medium)
Related PRs:
None — frontend only
Main changes explained:
Timer.jsxinterval cleanup so the timer properly stops in Firefox by restructuring theuseEffectto always return theclearIntervalcleanup function with the correct interval ID.play()calls in Promise handlers with.catch(() => {})to prevent unhandled rejection errorsaudioUnlockedRefand an unlockuseEffectthat silently primes both audio elements on first user click, bypassing Firefox's autoplay restrictionsHow to test:
Sayali_Fix_Firefox_Timer_Bugnpm install && npm run start:localScreenshots:
Note:
This is a frontend-only fix. No backend changes required. Bug was confirmed in Firefox — timer would not stop automatically and ding sound was silenced due to Firefox's strict autoplay policy.