[object Object] Icon

Encoding
Learn how to create, start, manage and modify Encodings

[object Object] Icon

Player
Learn how to create, start, manage and modify Players

[object Object] Icon

Analytics
Learn how to create, start, manage and modify Analyticss

User shortcuts for search
Focus by pressing f
Hide results by pressing Esc
Navigate via   keys

Fri Aug 31 2018

How to play Multi-DRM protected content with Intertrust / ExpressPlay

OverviewLink Icon

To decrypt the content, the player needs to receive the LA URLs (License Acquisition URLs) for the each DRM solution. These are obtained by requesting tokens from the ExpressPlay Multi DRM service API. To do so you will need an API Key (Customer Authenticator), which is available in your ExpressPlay admin backend.

Hint: ExpressPlay provides a Testing API Key as well as an Production API Key. The following examples are using service URLs, will work with the Testing API Key only. Therefore, please make sure to use the correct URLs before you go into production. You will find those production service URLs in your ExpressPlay admin backend.

Requesting an Widevine LA URLLink Icon

The example code below sends a POST request using CURL, which will return the full LA URL, which can be used for the player configuration afterwards. This request requires some query parameters (customerAuthenticator, contentKey, kid) to be set in order to be successful. All available query parameters and DRM options are available in the ExpressPlay REST API documentation for Widevine License Token Requests.

1curl -k 'https://wv-gen.test.expressplay.com/hms/wv/token?customerAuthenticator=EXPRESSPLAY_CUSTOMER_AUTHENTICATOR&errorFormat=json&kid=YOUR_KID&contentKey=YOUR_KEY&securityLevel=1&hdcpOutputControl=0'

Please replace the following placeholders with their actual value:

  • EXPRESSPLAY_CUSTOMER_AUTHENTICATOR This value is available in your ExpressPlay admin backend. Click "Show" to make the API Key visible, copy&paste accordingly into the URL. expressplay-customer-authenicator-test
  • YOUR_KID Replace it with the KID you used for your encoding
  • YOUR_KEY Replace it with the KEY you used for your encoding

Once that is done, the request is ready to be issued. Its response will contain a ready-to-use Widevine LA URL, and will look like the following:

1https://wv.test.expressplay.com/hms/wv/rights/?ExpressPlayToken=YOUR_WIDEVINE_EXPRESSPLAY_TOKEN

Now, we can add a Widevine DRM configuration to the source object of your player configuration. The player configuration would look like the following:

1var conf = {
2 key: 'YOUR-PLAYER-LICENSE-KEY-HERE',
3 source: {
4 dash: 'DASH_MANIFEST_URL',
5 drm: {
6 widevine: {
7 LA_URL: 'https://wv.test.expressplay.com/hms/wv/rights/?ExpressPlayToken=YOUR_WIDEVINE_EXPRESSPLAY_TOKEN'
8 }
9 }
10 }
11};

PlayReady LA URLLink Icon

Basically it works the same way as it does for requesting a Widevine LA URL. The example code below sends a POST request using CURL, which will return the full LA URL, which can be used for the player configuration afterwards. This request requires some query parameters (customerAuthenticator, contentKey, kid) to be set in order to be successful. All available query parameters and DRM options are available in the ExpressPlay REST API documentation for PlayReady Token Requests.

1curl -k 'https://pr-gen.test.expressplay.com/hms/pr/token?customerAuthenticator=EXPRESSPLAY_CUSTOMER_AUTHENTICATOR&errorFormat=json&kid=YOUR_KID&contentKey=YOUR_KEY&rightsType=BuyToOwn&analogVideoOPL=100&compressedDigitalAudioOPL=100&compressedDigitalVideoOPL=100&uncompressedDigitalAudioOPL=100&uncompressedDigitalVideoOPL=100'

Please replace the following placeholders with their actual value:

  • EXPRESSPLAY_CUSTOMER_AUTHENTICATOR This value is available in your ExpressPlay admin backend. Click "Show" to make the API Key visible, copy&paste accordingly into the URL. expressplay-customer-authenicator-test
  • YOUR_KID Replace it with the KID you used for your encoding
  • YOUR_KEY Replace it with the KEY you used for your encoding

Once that is done, the request is ready to be issued. Unlike the widevine response, a json string will be returned:

1{
2 "licenseAcquisitionUrl":"http://pr.test.expressplay.com/playready/RightsManager.asmx",
3 "token":"YOUR_PLAYREADY_EXPRESSPLAY_TOKEN"
4}

Now, we need to concatenate those two values in order get a working LA URL. To do so, we have to add a query parameter called "ExpressPlayToken" to the licenseAquistionUrl, set the token as its value. The resulting URL, will look like the following:

1https://pr.test.expressplay.com/playready/RightsManager.asmx?ExpressPlayToken=YOUR_PLAYREADY_EXPRESSPLAY_TOKEN

Hint: You might have noticed already, that the final LA URL starts with https:// instead of http:// like shown in the response example. This is because its supports https:// as well, however the ExpressPlay doesn't provide it that way. Further, browsers like Google Chrome require all resources, which are used for DRM playback, are served using https://. Otherwise, the browser won't expose the APIs, which are required for DRM playback, to the player.

Now we can add a PlayReady DRM configuration to the source object of the player configuration, so PlayReady DRM protected content can be played as well. The player configuration would look like the following:

1var conf = {
2 key: 'YOUR-PLAYER-LICENSE-KEY-HERE',
3 source: {
4 dash: 'DASH_MANIFEST_URL',
5 drm: {
6 widevine: {
7 LA_URL: 'https://wv.test.expressplay.com/hms/wv/rights/?ExpressPlayToken=YOUR_PLAYREADY_EXPRESSPLAY_TOKEN'
8 },
9 playready: {
10 LA_URL: 'https://pr.test.expressplay.com/playready/RightsManager.asmx?ExpressPlayToken=YOUR_PLAYREADY_EXPRESSPLAY_TOKEN\n'
11 }
12 }
13 }
14};

Give us feedback