How to keep connect when my Game playing an Ads?

cocoscreator
platform: android/ios
I found that when I play an ads, photon will disconnect.

Comments

  • sry, ios seems ok.
    only android will disconnect after video-ads back.
  • 08-22 10:38:47.379 6760-6796/? D/jswrapper: JS: 2018-08-22 10:38:47.379 [EMapContainer2P] onOperationResponse {"errorCode":0,"errorMsg":"","code":252,"content":[]}
    08-22 10:38:47.390 6760-6796/? D/jswrapper: JS: [INFO]: Master: Server closed connection
  • How do you run Photon app? Is this js code in browser or what? Playing ads? What does this mean exactly?
    In general, to keep connection, js code should be called at least once per sec as happens in browser background pages e.g.
  • My project was built using Cocos Creator.
    The Photon Javascript SDK is used.
    When the player is in the room, at this point he operates the application to cut to the background (for example, he starts playing a video ad).
    When he returned to the game, the Photon server was disconnected from him. He will receive a "Server closed connection". At this time, you can only use "rejoin" to reconnect.
    This experience is not very good. Can it be implemented: During the time when the advertisement is played for about 30 seconds, the client and the server remain connected?
  • So what do you run? Html application in browser or standalone application or maybe editor's preview (is it in browser also?). Did you try different export and preview options?
    What do you use for ads playback? Some plugin or maybe you playback video yourself from code?
    If you fail to prevent js engine from pausing, automatic rejoin looks like good option. In best case user should not notice reconnection.