-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ 546876b 🚀
- Loading branch information
1 parent
e2bd18c
commit 535972d
Showing
8 changed files
with
1,483 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
## What is this example | ||
|
||
This is an exmaple of how to setup a EventSub WebSockets connection inside a Web Browser. | ||
|
||
It will use implicit auth to obtain an access token and then connect to EventSub WebSockets | ||
|
||
## TRY THIS EXAMPLE NOW! | ||
|
||
This example is also available via GitHub Pages! | ||
|
||
Give it a [whirl here](https://barrycarlyon.github.io/twitch_misc/eventsub/websockets/web/basic/) | ||
|
||
## Reference Documentation | ||
|
||
- [OAuth Implicit Code Flow](https://dev.twitch.tv/docs/authentication/getting-tokens-oauth#implicit-grant-flow) | ||
- [EventSub](https://dev.twitch.tv/docs/eventsub) | ||
- [EventSub WebSockets](https://dev.twitch.tv/docs/eventsub/handling-websocket-events) | ||
|
||
## What this example doesn't do | ||
|
||
This example doesn't handle "long periods of silence where something has gone wrong and you need to reconnect". | ||
So make sure you honor the returned value in the welcome message of `keepalive_timeout_seconds` | ||
|
||
## Running the example | ||
|
||
This is so rough that you need to upload it somewhere or know how to start a WebServer on 127.0.0.1 port 80 locally | ||
|
||
If you have PHP installed | ||
|
||
> sudo php -S 127.0.0.1:80 | ||
Will get you going real quick | ||
|
||
## Disconnecting the App | ||
|
||
If you use the GitHub Live example to test, you can Disconnect the "Barry's GitHub Examples" Application on the [Connections page](https://www.twitch.tv/settings/connections) |
Oops, something went wrong.