Skip to content

Conversation

@bassarisse
Copy link
Contributor

I noticed that occasionally, on iOS 7, the visibilitychange event just doesn't get fired if you press the Home button when the game is active, so the sounds continued playing on background.

I don't know if that happens because I'm using a custom SoundEngine, based on Howler.js, but I guess that using the pagehide and pageshow events will do no harm, so here it is. I've added a check to prevent playing/pausing when unnecessary.

@dingpinglv
Copy link
Contributor

Hi Bruno,
pageshow and pagehide events have been tested on my iOS 7 device, but the sound still playing on Chrome.
About using the pagehide and pageshow events will do no harm. Yes, I agree with you.

Thanks

dingpinglv added a commit that referenced this pull request Mar 26, 2014
Sounds pause issue (iOS 7 bug)
@dingpinglv dingpinglv merged commit f5b57ee into cocos2d:develop Mar 26, 2014
dingpinglv added a commit to dingpinglv/cocos2d-html5 that referenced this pull request Mar 26, 2014
dingpinglv added a commit that referenced this pull request Mar 26, 2014
Issue #1719: added pageshow and pagehide events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants