Add a player library (Web Player)

Learn how to add a player library to a page.

JWP provides you with several ways to add the video player library to a page. The following table lists and describes each of these implementations.

ImplementationDescription
Cloud-hosted
(Recommended)
Best option for most developers who want an implementation that provides the most flexibility:

   • Access to the latest player features and functionality
   • Test pre-release player versions
   • Manage player configurations by JSON or in a dashboard UI
   • Create custom user experiences with JSON or through API calls

Player license keys are automatically rotated.
Cloud-hosted with API callsSame feature set as Client-side configuration above, but the best option for most developers who want to manage implementations solely via API calls
Self-hostedBest option for developers who need to control the version of a player:

   • Maintain a consistent player version
   • Manage player configurations through JSON
   • Create custom user experiences with JSON or through API calls

Player license keys are NOT automatically rotated.

🔑

If you are not a developer, do not have developer resources, or prefer a simpler implementation, read How to embed a JWP.



Cloud-hosted

  1. From the Players page, hover over a player name and click the icon that appears.
  2. Click Copy Player Library URL. The player library URL will be copied to your clipboard.
  3. Within the <head> of your page, paste the URL to the player library.
<script src="{cloud_hosted_player_library_url}"></script>


Cloud-hosted by JWP with API calls

  1. Make a call to api.jwplatform.com to list the existing players in your account (GET /players/list) or create a new player (POST /v1/players/create) . If this is your first time creating (POST) an item with the Management API, read our documentation on authentication and call syntax.
GET api.jwplatform.com/v1/players/list
POST api.jwplatform.com/v1/players/create HTTP/1.1
HOST: my-server
Content-Type:application/json
Accept:application/json

{
    "name": "{player_name}",
    "api_format": "{api_format}",
    "api_key": "{api_key}",
    "api_timestamp": "{api_timestamp}",
    "api_nonce": "{api_nonce}",
    "api_signature": "{api_signature}"
}
POST api.jwplatform.com/v1/players/create HTTP/1.1
HOST: my-server
Content-Type:application/json
Accept:application/json

{
    "name": "{player_name}",
    "advertising_outstream": true,
    "advertising_endstate": "suspended",
    "api_format": "{api_format}",
    "api_key": "{api_key}",
    "api_timestamp": "{api_timestamp}",
    "api_nonce": "{api_nonce}",
    "api_signature": "{api_signature}"
}
  1. Locate the key in the response, for example: {key: "aBCdE12G"}.
  2. Construct the cloud-hosted player library URL with the key: https://cdn.jwplayer.com/libraries/{key}.js.
  3. Within the <head> of your page, copy and paste the URL to the player library.

<script src="{cloud_hosted_player_library_url}"></script>

🔑

You can also use one of our client libraries to simplify authorization and authentication.



Self-hosted

The use of a self-hosted JWP library requires an Enterprise license. Please contact our team if you would like to upgrade your account.

  1. From the Players page in the Self-Hosted Web Player section select a release version to download from the Release Channel dropdown menu.

📘

After selecting a release channel version the following text updates occur:

  • The Released date beside the Release Channel drop-down will display the release date of the - selected channel.
  • Information and notes specific to the selected release will appear beneath the Release Channel drop-down.
  • The version number in the Download button at the bottom of the section will update to reflect the selected release version number (v8.xx.x)

  1. Copy the LICENSE KEY for the JWP library.
  2. Click the Download v8.xx.xx button.
  3. Rename and upload the unzipped library folder to your server. When renaming the folder, remove the periods from the folder name.
  4. Within the <head> of your page, copy and paste the URL to the player library and your license key.
<script src="https://www.yourdomain.com/{player_folder}/jwplayer.js"></script>
<script>jwplayer.key="{player_key}"</script>


Did this page help you?