Hi guys! I have a problem. I’m currently making a game for the web and I’m trying to make it so that when the window is minimized, the sound will stop playing, and when the window is active, the sound will start playing again.
I did this for a laptop and an Android phone, but on the iPhone the sound works strangely. When the game starts, the sound starts playing. When I minimize the browser the sound stops. But when opening the browser, the sound resumes every other time. I upload mp3 as sound.
Let’s say I open the browser again, the sound does not play. I minimize and maximize the browser, the sound plays. And this is constantly repeated.
I tried using music playback and audio playback in the conditions, I used a plugin, but nothing helped. Maybe you have some ideas?