How do I keep audio playing even when user is not with the browser open?

0 favourites
  • 2 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Hi guys! I have a game that runs on browser. In it, the player may want to keep hearing the audio of it even if doing other tasks (like reading a message or looking some social media app). The game keeps narrating some stuff while the player do other things in his phone.

    In the Audio Game Object, there's an option in it's properties called "Play in background". But it only plays in background the audio that has started playing while the player was looking into the game. Any audio that needs to be played after that one will not be able to be listened, needing the player to comeback and do some input.

    If it was a kind of a music player, the player would need to comeback to the app and hit the play button again to continue to listen to his music.

    Is this a bug? Is there some way to the user to keep listening to the narration of the game, that use different audio files, even when focusing on other apps?

    Thank you all in advance for any help provided! =)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I got what I needed to work installing this plugin here:

    construct.net/en/make-games/addons/462/run-background

    It allowed the game to keep running some of the tasks in background. Does not work with the "Wait X Seconds" event, so if you have to play audio as a time based event, some math and comparisons with the WallClockTime variable should work fine.

    Won't work on Apple phones, though.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)