You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the web version of Pyxel on iOS (and possibly on Android as well), when music is playing and the user switches to another app or leaves the page inactive for a while, the music may not resume playback when returning to the Pyxel page.
The conditions for reproducing this issue are not entirely clear. Sometimes the music resumes correctly, especially if the user returns to the page shortly after leaving it.
It seems challenging to address this issue solely on the application side. Would it be possible to investigate and address this behavior within the Pyxel engine itself?
The text was updated successfully, but these errors were encountered:
Regarding the sound playback on Web, Pyxel just uses SDL2 embedded in Emscripten and there's no difference from other platforms from the viewpoint of code for sound-related feature. So it would be the issue about SDL2 on Web.
Thank you for your response. I understand that the issue is caused by the behavior of Web SDL2.
As a non-expert suggestion, I wonder if it might be possible to forcibly resume audio playback by calling the SDL_PauseAudioDevice() method, which is also used in audio.rs, when the page becomes active again (e.g., triggered by the JavaScript 'visibilitychange' event).
On the web version of Pyxel on iOS (and possibly on Android as well), when music is playing and the user switches to another app or leaves the page inactive for a while, the music may not resume playback when returning to the Pyxel page.
The conditions for reproducing this issue are not entirely clear. Sometimes the music resumes correctly, especially if the user returns to the page shortly after leaving it.
It seems challenging to address this issue solely on the application side. Would it be possible to investigate and address this behavior within the Pyxel engine itself?
The text was updated successfully, but these errors were encountered: