Twitch now has an official WebOS app (they didn't when this project was started)!
The features in this project are now provided officially by Twitch, go check it out: https://us.lgappstv.com/main/tvapp/detail?appId=1004947
TTV4TV (Twitch TV for TV) is a front-end smart TV application powered by React-TV. It extends access to the Twitch API to load streams directly so that unneeded features can be stripped away, and overhead can be minimized.
- UI/UX powered by React-TV
- List top streams (paginated)
- List top games (paginated)
- List streams filtered by game (paginated)
- Search channels, streams, and games
- Play streams using embedded Twitch media player
- Login (server-less OAuth implicit flow)
- List channels you follow
Server-less login support exists for this App, with a single exception. For server-less login to work, this app must be served remotely using the Hosted Web App flow (yes, you read that correctly). The reason Twitch login is so limited here is due to two major blockers involving webOS and Twitch API:
- Twitch currently has no login support for limited input devices (as in TVs, IoTs, etc.). See this neat Google guide for an example of what the typical flow looks like.
- A webOS TV application is unable to redirect back to itself. What does this mean for Twitch API OAuth login? The answer is that logging in using the Twitch API OAuth flow requires leveraging the address bar for securely communicating access tokens. The flow works using a two-way channel established with a redirect URL. The inability to redirect back to the application cripples the flow, blocking out the incoming access token, disabling the login.
The ability to display a list of channels the current logged-in user is subscribed to. This feature was actually planned/groomed to be included in the POC for this App. The reason it was excluded is the need for a back-end: https://twitchemotes.com/apidocs (refer to the "Caching" section of that doc).
Currently the only way (that I know of) to fetch a list of subscriptions is to map emoticon set IDs to channels. The free service mentioned provides this, but it requires a proprietary server to cache the mapping (the mapping is provided as a large flat file).
npm
scripts are defined to facilitate building & running the project. Installing only requires an npm install
.
TTV4TV is built on top of React-TV with hope that smart TV cross compatibility will improve with time. With that said, currently, this App has only been tested to work with webOS based platforms.
Contribution is welcome through Github pull requests.
This software is distributed under The MIT License. See LICENSE.md for details.