What it does
It engages viewers with a voting tug-of-war where they compete to show their favorite clips. Streamers push a single button or send a single chat message, then are free to go AFK.
How I built it
By myself, during the TwitchCon hackathon, over about 14 hours.
Challenges I ran into
I'd forgotten a lot of React, so had to get back in that groove, and working alone meant moving fast and ugly, which increased cost of change as time went on.
What's next for AFK Clip Battles
Going to need to refactor the backend service and move it to a production environment, and add monetization to hopefully support the cost of running the backend. Viewers will be able to cheer bits to put their clip up in one of the voting spots.
It's also turbo-ugly, so I'll need to make the front-end presentable. Need to add clip previews, and also show updates as people vote to animate the tug of war, which will make it more interesting for people to spam.
Also need to make the voting configurable -> let streamers set the vote "keys" to emoji rather than "A" or "B."
- Can't autoplay without being muted in most modern browsers without user permission. There's probably a way to get permission, and if the overlay is hosted on Twitch and the viewer has interacted with the site, it might just work anyway, but for now, shipping with muted video.
Some clips have differently formed urls which include a pipe (|) that will break everything. Need to fix before testing more than just me :)
- There's no security between the extension and the EBS, especially the websocket server. The EBS should validate that the messages coming in are from valid clients before accepting votes, and should not mirror messages blindly.
- Refactor and port the EBS. Documentation made it seem like node was advisable and Twitch would host the service, but that's not the case. Should be redone to be more readable and plunked on AWS.
- Cleaner separation between client (extension) and server (EBS)
- Integrate with plugin config service to get things like the broadcaster's name and user ID.
- Investigate monitization - cheer with bits to choose an upcoming clip? (80/20 split on bits used in extension, streamer/dev)
- Investigate clip IDs - why do some (https://clips-media-assets2.twitch.tv/AT-cm%7C365489304-preview-480x272.jpg) have that weird
|) prefix? (kinda moot since they work)
- Make the portable app to allow for GUI or hotkey-based activation of the plugin. Compiled Autohotkey? Compiled Python?