WebGL Background Update time

Hi Team,

We are currently working with photon multiplayer in Playcanvas, The issue we are facing is that the updates for a player are stopped when user switches tabs, and continues after a delay, but during this time, user is losing data or we are getting peer error (game/master).

We have found the following reference document for WebGL, but we are currently not having the parameters described here as a part of the latest Javascript SDK v4.1.1.4 

We would appreciate some support regarding the solution for this issue

Answers

  • Normally, the background page is still updated but at very low rate: 1 time per sec. This is enough to keep the connection alive but may be too infrequent to continue the game running.

    The safest approach would be to leave the room when going to the background and rejoin it when returning back.

    The page you linked to is about Unity API. JS SDK is different though some methods are still applicable.