Skip to content

XIaoW_Add audio to forced paused timer#1602

Merged
one-community merged 2 commits intodevelopmentfrom
xiaow_add_audio_to_forcedPause
Jan 23, 2024
Merged

XIaoW_Add audio to forced paused timer#1602
one-community merged 2 commits intodevelopmentfrom
xiaow_add_audio_to_forcedPause

Conversation

@wang9hu
Copy link
Copy Markdown
Contributor

@wang9hu wang9hu commented Nov 29, 2023

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.

@ptrpengdev
Copy link
Copy Markdown
Contributor

ptrpengdev commented Nov 29, 2023

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!

image

Copy link
Copy Markdown
Contributor

@Alforoan Alforoan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@wang9hu
Copy link
Copy Markdown
Contributor Author

wang9hu commented Dec 18, 2023

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
Alforoan previously approved these changes Dec 31, 2023
Copy link
Copy Markdown
Contributor

@Alforoan Alforoan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything works as it should. Nice!

PR.REVIEW.1602.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants