RandomStream

Year

2018

Project Type

Web Development

Tools and Tech

React, Twitch API

About The Project

As a gamer, I frequently watch gaming livestreams on Twitch. I thought it would be cool if there was a way to discover new streamers by displaying random live Twitch channels to the user. As far as I can tell, at the time I started this project there was no built-in feature to watch random Twitch streams. I then looked into the Twitch API. While there was no straight-forward way to just request for a random channel, I figured out a work-around - I could fetch the total number of live streams, get a random number from that range, and send a second request with the random number as an offset to essentially return a single, random stream.

I wanted to keep the scope of the project small, but I added a couple of features I felt would make the app more useful:

  1. The ability to search for a specific category or game and return random streams only from that category. This search function is also powered by the Twitch API.
  2. A viewing history of all the streams watched, in case the user wanted to go back and watch a previously discovered stream. To simplify things, I stored this list in the browser's localStorage.

Finally, I developed the UI and functionality in React.

RandomStream home page