1ipt0n Posted June 8, 2015 Share Posted June 8, 2015 hi, in my init I have this.stage.disableVisibilityChange = false; when I check my game in chrome and window lost focus game is paused and also is sounds (end music in background) but when I create android apk (doesn't matter if it's just cordova, corsswalk or cocoon) and game is on background it's seems to be paused but background music is still playing. how I can prevent this ?Can I detect this pause/unpause event from disableVisibilityChange ?? Link to comment Share on other sites More sharing options...
MichaelD Posted June 8, 2015 Share Posted June 8, 2015 When game is paused this property will be true: game.pausedSo on update you could check if this is true then manually pause the sound. Link to comment Share on other sites More sharing options...
1ipt0n Posted June 8, 2015 Author Share Posted June 8, 2015 if game.paused is true there will be no update call Link to comment Share on other sites More sharing options...
drhayes Posted June 8, 2015 Share Posted June 8, 2015 1ipt0n is right, but a method named "pauseUpdate" will be called on your state instead. That music on Android thing sounds unexpected to me, but I have no experience sticking Phaser in Cordova so... Link to comment Share on other sites More sharing options...
1ipt0n Posted June 8, 2015 Author Share Posted June 8, 2015 thx, You are life saver Link to comment Share on other sites More sharing options...
Recommended Posts