Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIP does not unregister when page is left #1872

Closed
dilyanpalauzov opened this issue May 6, 2023 · 1 comment · Fixed by #1878
Closed

SIP does not unregister when page is left #1872

dilyanpalauzov opened this issue May 6, 2023 · 1 comment · Fixed by #1878
Labels
bug Something isn't working main ui Main UI

Comments

@dilyanpalauzov
Copy link

I have a SIP widget. When I change within the Main UI from Overview to Location/Equipment/Property the SIP widget does unregister (sends REGISTER with Expires:0). When I load the page, where thr SIP widget is shown, the SIP widget does again register.

The SIP widget shall unregister also when the page is left: tab is closed or a completely different page is typed in the URL.

openHAB 3.4.2, openhab-android 3.4.6

@dilyanpalauzov dilyanpalauzov added bug Something isn't working main ui Main UI labels May 6, 2023
florian-h05 added a commit to florian-h05/openhab-webui that referenced this issue May 7, 2023
Fixes openhab#1872.

This makes the foreground service also listen to the `visibilitychange` event to stop and resume foreground activity when the tab is changed or the browser is closed.

See https://developer.mozilla.org/en-US/docs/Web/API/Document/visibilitychange_event.

Signed-off-by: Florian Hotze <[email protected]>
@florian-h05
Copy link
Contributor

The SIP widget shall unregister also when the page is left: tab is closed or a completely different page is typed in the URL.

For tab change, #1878 fixes this. For the other cases where the tab is effectively killed, there is no real solution since the events that would allow to handle it are not reliable fired especially on mobile browsers.

@ghys ghys closed this as completed in #1878 May 7, 2023
ghys pushed a commit that referenced this issue May 7, 2023
Fixes #1872.

This makes the foreground service also listen to the `visibilitychange`
event to stop and resume foreground activity when the tab is changed or
the browser is closed.

See
https://developer.mozilla.org/en-US/docs/Web/API/Document/visibilitychange_event.

--
Signed-off-by: Florian Hotze <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working main ui Main UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants