cocos2d/cocos2d-html5 — pull request #1719 by bassarisse (2014-03-26 02:24:50+00:00)
Title: Sounds pause issue (iOS 7 bug)

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.