Skip to content

NathanRSFC/jwplayer-tizen-app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JW Player Tizen App

Embed a Player in a Tizen App

This is JW Player’s demo application for Samsung Tizen Smart TVs showcasing how the player can be used for such applications. It is a Tizen Web Application built with HTML, CSS, and JS and targeting Tizen 4.0+ and 2018 Smart TVs and later.

There are three screens to the demo app. The main playlist landing page, the video detail page, and the player page.

Build System

The Tizen Demo App has a unique build setup to make it easier to integrate webpack and es6. The build system is a simple webpack/babel setup used for compiling with eslint used for linting. The source code in src is compiled and output to app/dist. The app itself is created in this app directory and imports the compiled source code directly.

Getting Started

Download Tizen SDK: https://developer.tizen.org/development/tizen-studio/download

  1. Clone or download this repository.

  2. Launch Tizen Studio and select File -> Import -> Tizen -> Tizen Project

  3. Import the app folder from the tizen-demo-app directory into your workspace.

  4. Open a terminal from the tizen-demo-app directory and run npm install to initialize the project dependencies.

  5. Run yarn build. This will generate or update jw-tizen.css and jw-tizen.js in the app/dist folder, both of which are needed to run the project.

  6. In app/index.html, you will need to add a link to your player that will be used in the app. It is the same process as Adding a JW Player Library to a Page

    In the <head>, add either of the following:

    • <script src="https://www.yourdomain.com/{player_folder}/jwplayer.js"></script> <script>jwplayer.key='{player_key}'</script>

    • <script src="{CLOUD-HOSTED_PLAYER_LIBRARY_URL}"></script>

Application Certificates

In order to run the application, you need to create an author and a distributor certificate: Samsung Creating Certificates Docs.

If you are running the application on a TV, you need to know the TVs Unique Device ID (DUID), which can be found here:

  • On your TV, go to Menu > Support > Contact Samsung > Unique Device ID.

Running the Application

You can run the application in 3 different environments - a Web Simulator, an Emulator, or a TV. The simulator is great for development and quick run throughs, whereas the tv is better for the actual experience.

Web Simulator

Samsung Web Simulator Docs

  1. Right click the project and select Run As > Tizen TV Web Simulator Application (Samsung TV)

*Right click on the simulator to open a settings menu so you can access things like the web inspector.

Emulator

Samsung Emulator Docs

  1. Right-click on the project and select Run As > Tizen Web Application

If that doesn’t work try:

  1. Go to Tools > Emulator Manager

  2. Select the Emulator you want and click Launch

  3. Wait for a colorful ATV Screen

  4. Right-click on the application's folder and choose Run As > Tizen Web Application

*The emulator can lag, so it is recommended to use a real device if possible.

Tizen TV

Samsung TV Docs

Directions to setup the TV and configure it as a device are outlined in the linked doc.

  • Make sure the TV is connected to the same wifi as your computer.

  • To find the TVs IP Address:

    1. Open the TV Settings Menu by selecting SETTINGS on your remote or navigating to SETTINGS from the Smart Hub

    2. Select General -> Network -> Network Status -> IP Settings

  • When configuring the device in Tizen Studio, if there is no port, keep the default 26101 port

Once you finish setting up and configuring in Tizen Studio

  1. Right click the project and select Run As > Tizen Web Application

Updating the App

Adding/Updating Application Screens

  • Any changes made to the application’s source code belong in the src folder.

  • Run yarn build after any changes to update the compiled dist files.

  • You will need to restart the app to show any changes.

Adding/Updating Application Media

To change the media used within the application, you will need to update the playlist feeds supplied to it.

  • In src/js/index.js in the init function, you will see an object passed into the Gallery component like below:

      gallery = new Gallery({  
      	feeds: [PLAYLIST_ID_1, PLAYLIST_ID_2, ...],  
      	parent: {view: mainDiv},  
      	init  
      });
    

    The values in this object’s feeds array are Playlist IDs from your account dashboard.

  • To update a playlist used within the app, you will just need to update the playlist for the desired playlist id in your dashboard.

  • To add a new playlist to the app, create a new playlist in your dashboard and add the created playlist’s id to this array.

  • You will need to restart the app to see your changes reflected.

Debugging

If you are using the Web Simulator, you can debug similarly to how you would debug in a browser. To pull up the web inspector, right click on the simulator and select Web Inspector.

If you are using the Emulator or TV, you can right click on the project and select Debug As -> Tizen Web Application and a web inspector will appear.

Possible Issues

Check out JW Player Tizen Troubleshooting.

Still need help? Please open an issue in this repo or reach out to our Support Team.

Helpful Resources

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 74.6%
  • CSS 22.4%
  • HTML 3.0%