Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

robolivable/TTV4TV

Repository files navigation

Notice

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

What is TTV4TV?

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.

Features of this App

  • 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
Note on "session based" features (a.k.a., login)

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:

  1. 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.
  2. 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.

What's missing?

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).

Screenshots

screen shot 2018-11-08 at 10 31 22 am screen shot 2018-11-08 at 10 31 32 am screen shot 2018-11-08 at 10 23 54 am screen shot 2018-11-08 at 10 24 37 am screen shot 2018-11-08 at 10 24 50 am screen shot 2018-11-08 at 10 25 16 am screen shot 2018-11-08 at 10 28 20 am screen shot 2018-11-08 at 10 29 48 am screen shot 2018-11-08 at 10 30 11 am screen shot 2018-11-08 at 10 30 20 am

Development

npm scripts are defined to facilitate building & running the project. Installing only requires an npm install.

Compatibility

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

Contribution is welcome through Github pull requests.

License

This software is distributed under The MIT License. See LICENSE.md for details.

About

TTV for smart TVs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published