Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect CocoonJS.App #1150

Merged
merged 2 commits into from Aug 30, 2014
Merged

Detect CocoonJS.App #1150

merged 2 commits into from Aug 30, 2014

Conversation

videlais
Copy link
Contributor

There's a bit of a story behind this, but I'll try to keep it short.

While I've been working on a patch to detect Cordova's 'pause' and 'resume' events for Phaser.Stage's checkVisibility(), I came across this thread over on the forum. My hope, at the time, was that someone else would come along and write this patch and I could use their work to finish my own code. But, since that hasn't happened yet (and might never), I'm sending in this PR first for the check that establishes a 'game.device.cocoonJSApp' boolean that I plan to use later.

Basically, this sets up the check for the 'CocoonJS.App' global object for the later use of the two following functions:

CocoonJS.App.onSuspended.addEventListener();
CocoonJS.App.onActivated.addEventListener();

The next PR (the one that actually uses this check) may or may not come in the next few days depending on my own schedule. However, I wanted to send in the research and set it up so that if I don't get to it in time for Phaser 2.1, someone else could finish it.

Dan Cox added 2 commits August 29, 2014 20:58
There's a bit of a story behind this, but I'll try to keep it short.

While I've been working on a patch to detect Cordova's 'pause' and 'resume' events for Phaser.Stage's checkVisibilityChange(), I came across this [thread] (http://www.html5gamedevs.com/topic/8834-cocoonjs-pause-game-on-app-switch/) over on the forum. My hope, at the time, was that someone else would come along and write this patch and I could use their work to finish my own code. But, since that hasn't happened yet (and might never), I'm sending in this PR first for the check that establishes a 'game.device.cocoonJSApp' boolean that I plan to use later.
photonstorm added a commit that referenced this pull request Aug 30, 2014
@photonstorm photonstorm merged commit 5cfb51b into phaserjs:dev Aug 30, 2014
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.

None yet

2 participants