"On suspended" not called on iOS

Discussion and feedback on Construct 2

Post » Sat Nov 23, 2013 8:09 pm

Hi everyone,

my teammate and I finished a commercial game project in html5, and after struggling for a while with sound across android and iOS, my teammate finally got it almost working everywhere.

The problem is that the "on suspended" and "on resumed" events of the browser object aren't called on Safari. Thus, the looped music doesn't stop when pressing home or switching tabs.
It's working fine on desktop and on chrome in particular. Below, you'll find an example project and capx that you can test directly : the square changes color when the "on suspended" event is being called.

Online demo
Capx

May you have any solution to this problem please ? May there be another way to detect a tab switch or if the user presses the home button on ios and/or android ?

Kind regards,
Nathan
Valerien2013-11-23 20:14:34
B
79
S
22
G
4
Posts: 311
Reputation: 12,844

Post » Mon Nov 25, 2013 10:27 am

Nobody has had this problem yet ? Or any potential solutions ?

Cheers,
Nathan
Valerien2013-11-25 10:27:18
B
79
S
22
G
4
Posts: 311
Reputation: 12,844

Post » Mon Nov 25, 2013 11:23 am

Just like "Request Fullscreen", it probably just doesn't exist on ios.
Some companies that make browsers view the html5 specification as suggestions, rather than directions.
Image ImageImage
B
172
S
50
G
184
Posts: 8,444
Reputation: 116,107

Post » Mon Nov 25, 2013 12:56 pm

Support for this was added in iOS 7, and I just checked on an iPad and it works. Are you using an old version of iOS?
Scirra Founder
B
403
S
238
G
89
Posts: 24,654
Reputation: 196,155

Post » Mon Nov 25, 2013 1:31 pm

I am using iOS 7.0.4 on an iPad 3 here, and it doesn't work when pressing home (the square stays red). When switching tabs inside of safari, it works though.
We have a machine running on iOS 6 too, and it simply doesn't work there. But if I understand correctly, this is a normal behavior.

Thanks much,
Nathan
B
79
S
22
G
4
Posts: 311
Reputation: 12,844


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 14 guests