Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update teams Custom Tabs when it's not focused

Actually I'm developing a custom tab that needs to be updated via web sockets.

The problem is that when user change tab or app ( for example quit the custom tab app to use chat feature in teams ) the application get "killed" and it does not intercepte the data emit from server using web socket then update the view.

My use case is to update the view when server push data even when the tab is not focused.

Is there a way to do that ?

like image 317
infodev Avatar asked Nov 07 '22 07:11

infodev


1 Answers

I think there's confusion between the idea of a "tab" in Teams versus a "tab" in the browser. In the browser, you can have a tab open, but be active on another tab. In that case, a websocket could be running, updating the content so that when a user goes back to the tab, it's already updated.

In contrast, in Teams, when a user views a tab, it's effectively loaded into an iframe. When the user browses away, the iframe is destroyed, and when they come back, the iframe it recreated, and the page -completely reloaded- again. As a result, there is no need, and it is not possible to "push" data to the tab when it's not in focus. However, when it is in focus/being used by the user, you can certainly keep it up to date using, for example, signalr.

like image 159
Hilton Giesenow Avatar answered Nov 14 '22 21:11

Hilton Giesenow