[Solved]audio not working when browser suspended/inactive

Get help using Construct 2

Post » Sat Apr 19, 2014 1:41 pm

hey, i almost found a related topic, but it didn't quite answer my questions

i imported a song; it all works great except it pauses when the tab is inactive or the browser minimized and resumes when i get back on the game tab

it's not such a big problem(especially since that part of the game is short), but if i were to play and chatting with someone at the same time, the song pausing and resuming all the time would be annoying

tried this with a fresh new project, with only one event (play the song at layout start) and if i change tabs it still pauses

again not a big deal since it's a short, small game, but in the future, if i'm planning to do something bigger, i would appreciate it if the song will continue to play even when the browser is suspended

thank you
Last edited by acsel on Sat Apr 19, 2014 3:30 pm, edited 1 time in total.
B
3
Posts: 2
Reputation: 179

Post » Sat Apr 19, 2014 2:14 pm

Check in your project properties if "Pause on unfocus" is No.
B
28
S
2
G
3
Posts: 20
Reputation: 3,535

Post » Sat Apr 19, 2014 2:25 pm

It's by design, because it's probably even more annoying if it keeps playing in the background even after switching to another tab. What if the second tab you switched to was another game that also played music?
Scirra Founder
B
403
S
238
G
89
Posts: 24,654
Reputation: 196,155

Post » Sat Apr 19, 2014 3:29 pm

Ashley wrote:It's by design, because it's probably even more annoying if it keeps playing in the background even after switching to another tab. What if the second tab you switched to was another game that also played music?


i don't even consider adding any kind of sound (be it a short effect or a song) without a button to mute it. that would be an improper design

anyway thank you for the quick reply, at least now i know i'm not doing something wrong
B
3
Posts: 2
Reputation: 179


Return to How do I....?

Who is online

Users browsing this forum: BiffanyPFH, dop2000 and 25 guests