XIaoW_Add audio to forced paused timer#1602
Merged
one-community merged 2 commits intodevelopmentfrom Jan 23, 2024
Merged
Conversation
Contributor
|
Hi @wang9hu , could you provide more details on how to test the PR with forced paused and lost connection? I assumed that stopping the backend server would lead to a lost connection. However, it seems like not the case. The timer keep running even with a stopped backend server. Thank you! |
Alforoan
suggested changes
Dec 17, 2023
Contributor
Alforoan
left a comment
There was a problem hiding this comment.
I tested different ways of triggering the audio and it seems to work the first or the second time, but if you keep refreshing, it stops triggering the audio.
pr.review.1602.mp4
Contributor
Author
|
Thanks for the reviews, @ptrpengdev and @Alforoan! I have updated the description and hopefully it can help resolve some of the confusions. Let me know if you have more questions. |
Alforoan
previously approved these changes
Dec 31, 2023
Contributor
Alforoan
left a comment
There was a problem hiding this comment.
Everything works as it should. Nice!
PR.REVIEW.1602.mp4
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
Add audio to forcedPause when timer is forced paused or lost connection.
The purpose of this PR is to let users to know when their timer is paused unintentionally due to reasons like internet issues, especially when the app page is running in the background.
This is not intended as a reminder when the user loads the page for the first time or upon refresh, because audio cannot be played directly upon opening a site or refresh.
How to test
It is tricky to test this because if everything is running locally then disconnecting internet wouldn't help that much in this case. The tricky part is to keep the server running when break the connection locally, and the only way I can think of is to save on the frontend code to trigger a pseudo-refresh of the app, which isn't technically a browser level refresh but it breaks and reconnect the connection to server.