/smarttv-twitch

Twitch app for Samsung Smart TV's 2015 and newer models, in doubt read the README bellow

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

smarttv-twitch

This is an application for Samsung SmartTV's designed to watch Twitch.tv broadcasts, A official Twitch.TV app is not available for most countries, that is way this project exist.

The application fully support all 4k and 1080p Samsung TV released in 2016 and up, if yours TV is a 2015 or older model and it's SmartHub menu is different from the bellow image, yours TV may not fully supported Twitch Live Streams and some Vod streams. Live

Full support for all 2015 TV is not possible as the TV firmware doesn't supports it, Samsung doesn't seems to care and may have remove the featuring intentionally (as the featuring simply stop working), a discussion about it was done in a issue from a repository that is no longer available, the final answer from Samsung can be read here Samsung final answer about 2015 TV it summarize what happened from they side.

In doubt open a issue

Android TV version

A android version of this is available here: SmartTwitchTV
The android version is a full web base app that can be used to port this project to any other OS, so check that in case you wanna to port this for a web base OS.

About this fork

I initially fork this from https://github.com/CazuzaCzz/smarttv-twitch/commits/tizen The original fork is https://github.com/nikitakatchik/smarttv-twitch

I have started this project because the above Repos of the app did not fully support my TV model, it had many bugs and the app did not had all Twitch.TV featuring like a more complete users interface (For VOD, Cips, basic Channel off line content, Chat and etc related) it also didn't fully support the latest version of Samsung smart remote.

So I start this new repo keep the original name and commit history, work a long time writing this a new application basically from scratch focusing on performance and all available Twitch.TV featuring, with the help of some users reporting bugs and making featuring request, I add many features and work to resolve all the bugs, today the application is very complete, can be easily used to watch all available Twitch.TV content and give the user a lot of extra options, but is know that the application can be always improved, new featuring and improves are always in the works, mostly to give a better experience and more options to the user, but as today there is only one main developer working on this project the process is slow, but fell free to report bugs and make request, for that use the open a issue option of this repo.

Project Dependencies

How the application looks

The application never stops receiving updates the bellow images can be outdated Live

Twitch.TV authentication key

Add_key

After setting up a user on the application you can add a Twitch.TV authentication key, to be able to fallow/unfallow and access subscribed only past broadcast (for channel you are Sub to and block VOD access to none subscribers) as described on the above screen shot. The key is generated on the bellow page, the page receives a key after you use it to request one with the official Twitch.TV web site, the bellow page link is the same as showed on the application screen.

Twitch.TV app for Samsung TV authorization request page

Controls

control

The Application is tested with the above remotes (Any Samsung remote that has those same key/function must control the app even if the remote looks is a little different)

The key INFO is also map in the app with the same functions as the GUIDE key, as some remotes may not have one of those.

Bellow are the on screens controls

To access the controls from any screen press key A or on smart remote press the 4 color buttons (color) after Directional pad up for red A key and chose controls, if you are playing a stream use the C yellow key to directly open the controls

Main controls

Main

Player controls

Players

Installation instructions:

Installation guide Tizen Studio (tested on Linux Ubuntu 16 and up and windows 10 64 bits)

Account and Downloads

  • Create a Samsung account if you don't have one, and set it up as a developer account SAMSUNG DEVELOPERS
  • Log in with the developer account on the TV, open the application "APPS", press the key sequence 12345 in the remote, a new window will pop, enter your computer LAN IP address (The computer you plane to use to install this app) and make sure you click "On" to enable the developer mode, after pressing OK, reboot the TV by unplugging from power and plug back on. Click here to read SAMSUNG Guide Connecting the TV and SDK
  • Download and install Tizen Studio

Installation Tizen and Java SDK

  • I used the Tizen Studio 2.4 with IDE installer (Any version above that must work well), download the 32/64 bit according to yours CPU architecture, on windows it is a .exe file around 480MB just install it like any other .exe file, on Linux the file is a executable binary 480Mb size, to run it first give the file permission to execute, properties > permission > Execute... mark, then just drag the file to a terminal window and click enter, On Linux it may ask you to use apt-get to install missing dependencies below are the one asked by Tizen Studio 2.4 last time I installed it

sudo apt-get install libwebkitgtk-1.0-0 rpm2cpio expect python2.7 ruby libwebkitgtk-1.0-0 libpng12-0

If you get a error "Package libpng12-0 is not available... etc..." do the bellow, if no error skip to "Install Java SDK"

sudo apt-get install libwebkitgtk-1.0-0 rpm2cpio expect python2.7 ruby libwebkitgtk-1.0-0
wget "http://security.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb"
sudo dpkg -i "libpng12-0_1.2.54-1ubuntu1.1_amd64.deb"

If you get a error "Package libwebkitgtk-1 is not available... etc..." do the bellow, if no error skip to "Install Java SDK"

wget http://mirrors.edge.kernel.org/ubuntu/pool/universe/w/webkitgtk/libjavascriptcoregtk-1.0-0_2.4.11-4_amd64.deb; sudo dpkg -i libjavascriptcoregtk-1.0-0_2.4.11-4_amd64.deb; sudo apt install -f
wget http://mirrors.edge.kernel.org/ubuntu/pool/universe/w/webkitgtk/libwebkitgtk-1.0-0_2.4.11-4_amd64.deb; sudo dpkg -i libwebkitgtk-1.0-0_2.4.11-4_amd64.deb; sudo apt install -f"

  • Install Java SDK, I install this app with Open JDK java 8 on windows go to Java SE Development Kit 8 Downloads download the latest version of jdk when this was tested it was "jdk-8u152-windows-x64.exe" for 64bit windows or "jdk-8u152-windows-i586.exe 32bits ", on linux terminal commands below

sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk

  • Press enter and Click OK/YES and accept all the requests from java installer on the terminal

Tizen Package Manager(Installing the tools)

  • Open Tizen Package Manager to start install the bellow, some may already be installed by default
  • Main tab (Main SDK) Install 4.0 TV(or wherever X.X TV version there is) and Tizen SDK tools, (on linux it may request you to use apt-get to install missing dependencies)
  • Second tab (Extension SDK) under TV Extensions-4.0 (or wherever X.X TV version there is) install Web app. Development, install Samsung Certificate Extension and under TV Extension Tools install Web app. Tools (on Linux it may request you to use apt-get to install missing dependencies)
  • After everything finish installing close the package manager it will ask if you wanna to open the Tizen Studio YES click open, if on windows it may request to add firewall permission for Tizen give.

Bellow imgs showing the installed packages (the one with a delete option are installed)

SDK_installation_1 SDK_installation_2 SDK_installation_3 SDK_installation_4

Setting up the build environment:

  • Open Tizen Studio, then start the device manager by clicking on drop down menu that has a option by default "No target" and select "Launch remote device manager" if you don't find the device manager on the studio just open it as a separated app it must be installed just like the studio
  • On device manager click on Scan it must find your TV if it is setup ok and on the same network, if it doesn't find try to add it manually by clicking on the + option and add your TV IP address don't change the Port, to get the address go to main menu > network > Network status... wait a moment extra options will be loaded, click on IP Settings read yours TV IP Address

device_manager

  • After having the TV IP showing in the screen, click in to connect, when connect you see something like the bellow device_manager

Generate a certificate:

  • back to Tizen Studio > Tools > Certificate Manager > + > select/click Tizen > create a new author.. next > setup name password etc... next > Use the default Tizen... Finish > Success click OK
  • Select the certificate it must have a "V" on the front of it (that means yo have select it) close the Certificate Manager

certificate

  • If you click in finish and you see the above image just go to next step Setup the application: if not read the bellow in order to address the Tizen issue on creating a certificate it started in late 2018 after some Tizen SDK version update

  • If when you click on Finish the app just tries and just don't do anything, is because it has a issue creating a Author, this is a bug of Tizen. To fix generate a certificate using this recommendation Creating Certificates Samsung site, but after you finish don't use that certificate because it may not work to install the app, repete the process of creating a Tizen certifacate ... Certificate Manager > + > select/click Tizen > here use the author created before by choosing "select existing..."

certificate

  • Now find the folder that has this name "SamsungCertificate" open the folder inside (it has the name choosed when creating a Samsung profile) and chose the **author.p12 ** file

certificate

  • Add the same password added before and click next > Use the default Tizen... Finish > Success click OK, it must finished now

certificate

Setup the application:

install_app1

  • Making the app, Top menu > File > New > Tizen Project > click twice in Template > click twice in TV > click twice in Web Application > click twice in Basic Project > chose a project name any name ....click finish

install_app2 install_app3 install_app4 install_app5 install_app6

  • Wait for it to load
  • Back on Tizen Studio, Left click on the folder symbol with AnyName-X.0 on the left corner under project explorer just to select the folder(AnyName-X.0 is the default name give when you created a project on the past step, if you change the name click on that)
  • Top menu > File > Import > General > File System ... next > Browser to find the extracted folder from the release_X_X_X.zip ... > click Select All, mark Overwrite existing ... > Finish
  • Wait for it to load
  • The name of the folder AnyName-X.0 changes to AnyName-something-public-2.4

install_app7 install_app8_1 install_app8_2 install_app8_3 install_app9

Install the application:

  • Click on that folder AnyName-public-2.4 left click, then right click > Run as > 1 Tizen wen Application, the installation will start
  • If everything goes OK the app must be opened in a few seconds on the TV, and you can start using

install_app10

  • If it fail during the installation make shore you don't have any other Twitch.TV application installed on the TV, to uninstall the app manually, just open the "apps" application find all Twitch.TV app you have install in "my app" tab hold down the enter/select key on the top of the app and choose delete, after you have delete all Twitch.TV apps, try to install again.
  • This app can update it self on 99% of the update cases, so this installation process will only be needed to be redone on a major update were the change are not possible to be done by the app it self, the app will warn the user the day there is a need to update manually and then will be necessary to redo the installation process.

In doubt open a issue