-
Notifications
You must be signed in to change notification settings - Fork 15
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
Implement Chrome browser notifications when high score is beat #9
Comments
@Sageth Wouldn't this need to be done using sockets ? I'm curious, because otherwise you'd have to poll with AJAX... |
I haven't looked too deeply into it, other than cursory looks: At a glance, this looks like it's an API call, but like I said, I haven't looked too deeply into it, so it may be much more involved than I initially thought. |
@Sageth Yes, this is only the type of notification that can be sent. Typically when handling notifications it's either caller event based, eg. clicked on this button, show a notification. So what you're actually looking for here, is whether or not you're willing to have the user refresh the page in order to get the notification, or will the notification be pushed "real time". I'll run through the code and see if you aren't already using some sort of socket that I can just connect to. |
Thanks for the clarification. I had envisioned the event occurring during score submit process, which should only occur with those types of games. The score submission should occur here: https://github.com/Sageth/phparcade/blob/master/includes/classes/Scores.php#L53 This is an old codebase (PHP4, or possibly earlier) that I've spent a lot of time modernizing as part of my own learning, so I know the socket_ functions aren't used anywhere. I do appreciate the insight on this, though. |
I've since decided to use Discord for notifications due to the feature set. This was implemented in fb44d46 and have had a number of bug fixes to address some specific scenarios since implementation. Closing issue. |
If player A has the high score and player B beats the score, Player A should get a browser notification that their score was beaten.
The text was updated successfully, but these errors were encountered: