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.
Implementation | Description |
---|---|
Cloud-hosted
(Recommended) |
Best option for most developers who want an implementation that provides the most flexibility:
Player license keys are automatically rotated. |
Cloud-hosted with API calls | Same feature set as Client-side configuration above, but the best option for most developers who want to manage implementations solely via API calls |
Self-hosted | Best option for developers who need to control the version of a player:
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
- From the Players page, hover over a player name and click the β¦ icon that appears.
- Click Copy Player Library URL. The player library URL will be copied to your clipboard.
- 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
-
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}" }
-
Locate the
key
in the response, for example:{key: "aBCdE12G"}
. -
Construct the cloud-hosted player library URL with the
key
:https://cdn.jwplayer.com/libraries/{key}.js
. -
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.
- 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 below the Release Channel dropdown menu displays the release date of the selected channel.
- Information and notes specific to the selected release will appear beneath the Release Channel dropdown menu.
- 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).
- Copy the LICENSE KEY for the JWP library.
- Click the Download v8.xx.xx button.
- Rename and upload the unzipped library folder to your server. When renaming the folder, remove the periods from the folder name.
- 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>
Updated about 1 year ago