ai / ai/visibilityjs

how to not call visibility if i made fullscreen

Open
#49 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.8k
Forks
106
PR merge metrics
No merged PRs in 30d

Description

So in my app, I have games and when I click `play` , what I do is call `fullscreen` code which starts the game in `fullscreen` mode.

Somewhere in my app, I have this piece of code:

```js
this.visibility = Visibility.change((event, state) => {
switch (state) {
case 'visible':
break;
case 'hidden':
console.log("coming here ? ");
break;
}
});
```

Now, this works fine for all cases except `fullscreen`. The thing I want is when `fullscreen` gets activated, I don't want it to call `console.log("coming here ?")`. I don't want it to do anything. Is this possible?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.