Set up a player (FireTV)

Add a player in your Android app or Fire TV project.

The JWPlayerView is the central logic component of our SDK. This class allows you to easily load new media into the player, manage video and audio playback, and register multiple event listeners that could help you with custom analytics or error handling.


If you have unique implementation requirements, please contact your JWP representative.


Use the following steps and code examples to add the JWPlayerView to the app/res/layout/activity_main.xml and app/java/ files of your app:

  1. In app/res/layout/activity_main.xml, add the JWPlayerView.
   android:layout_height="match_parent" />
   android:layout_height="match_parent" />
  1. In app/java/, set your license key.
new LicenseUtil().setLicenseKey(this, "YOUR_LICENSE_KEY");

  1. Get a reference to the player.
JWPlayerView playerView = findViewById(;
JWPlayer mPlayer = mPlayerView.getPlayer();

  1. Use PlaylistItem.Builder() to create and define a PlaylistItem object.


For videos hosted with JWP, use the following steps to retrieve the URL of a video:

  1. Click the name of the video in your JWP dashboard Media Library.
  2. Under Media Summary, click the View Assets.
  3. On the Video Renditions tab in the row of a specific rendition, click ∨ to reveal the DIRECT URL.
  4. Copy the DIRECT URL.
  5. Click Close.

Hosting your videos with JWP enables you to query the Analytics API to access SDK video metrics.

PlaylistItem playlistItem = new PlaylistItem.Builder()

  1. Create a List<PlaylistItem> object. Add the PlaylistItem object to the List<PlaylistItem> object.
List<PlaylistItem> playlist = new ArrayList<>();

  1. Use PlayerConfig.Builder() to create a PlayerConfig object. Assign the List<PlaylistItem> object to the playlist property of the PlayerConfig object.
PlayerConfig config = new PlayerConfig.Builder()

  1. Set up mPlayer with the PlayerConfig object.