Listener listener = // Extend the ListenerAdapter ClassĬonfiguration configuration = new Configuration. String channel = "#tomcools" // The IRC channel name = Twitch Channel name String authToken = "oauth:YOUR_TOKEN" // Your oauth password from I chose for a Spring Boot application, always good to keep some familiar technologies close when you are building something unfamiliar. It seems like I had no other choice than to put a custom Backend between my Frontend and the Twitch Chat. So…back to the drawing board! The Java IRC Client Unfortunately, they do not magically play well together. WebSockets are a separate application layer protocol, just like IRC is an application layer protocol. WebSockets however always start out as a HTTP request and get “upgraded” to TCP. This may sound surprising with the popularity of WebSockets. Javascript, at least the sort of Javascript running in the browser, can’t make regular TCP socket connections. Nice! Since IRC is so common, I only had to find a way to connect my front-end to the IRC chat and we are good to go.Īnd that is kind of where my original plan fell apart. It’s a fairly simple text based protocol which has been around for 30 years now and is still used today. Those feelings quickly went away when I learned the good news:įor those of you who might not know this… IRC, or Internet Relay Chat, is an Application Layer Protocol built on TCP. I really didn’t want to use some screen-scraping tooling or whatnot to get the chat messages. I was a bit worried this might be a difficult task. So now I just need to integrate with the Twitch Chat and use that as input for whatever I’m making. If that is the common way of doing things, I’m not going to fight that. Scouting around on some Twitch streams, I quickly noticed that the way most Twich users interact with the streamer is through the chat. I’ve had some previous experience with p5.js, so I’m going to use that again for this project.Īll I needed to do then was find a way to integrate with Twitch… somehow. Making it in Javascript/HTML makes it more accessible, since all users would need is a browser. To keep the bar of entry low, I’m going to create some kind of web-based game. Streamer Audience Twitch Javascript+HTML Interacts with JSON?/Screenreader? Opens website Streams website to Twitch
0 Comments
Leave a Reply. |