[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

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

Thu Feb 23 2023

How to play DRM protected content with DRM.cloud

OverviewLink Icon

Nearly every license provider, including drm.cloud by Insys Video Technologies, requires a few unique parameters to be sent to the DRM license acquisition server. In this case, these parameters are available from Insys Video Technologies Dashboard at videokit.cloud.

Instead of integrating many license providers into the core of the Bitmovin player, we decided to provide necessary configuration options via the player configuration.

WidevineLink Icon

1var source = {
2 dash: "DASH_MANIFEST_URL",
3 drm: {
4 widevine: {
5 LA_URL:
6 "https://TENANT_CODENAME.la.drm.cloud/acquire-license/widevine?brandGuid=BRAND_ID&userToken=USER_TOKEN",
7 },
8 },
9};

Please replace the following placeholders in the code:

  • DASH_MANIFEST_URL: The URL to the DASH manifest (MPD) file.
  • BRAND_ID: Your brand ID, retrieved from the videokit.cloud dashboard.
  • USER_TOKEN: A JWT token signed with a shared secret that authorises a given license request. More information on how to create JWT User Token available here.
  • TENANT_CODENAME: Tenant name, retrieved from the videokit.cloud dashboard.

PlayreadyLink Icon

1var source = {
2 dash: "DASH_MANIFEST_URL",
3 drm: {
4 playready: {
5 LA_URL:
6 "https://TENANT_CODENAME.la.drm.cloud/acquire-license/playready?brandGuid=BRAND_ID&userToken=USER_TOKEN",
7 },
8 },
9};

Please replace the following placeholders in the code:

  • DASH_MANIFEST_URL: The URL to the DASH manifest (MPD) file.
  • BRAND_ID: Your brand ID, retrieved from the videokit.cloud dashboard.
  • USER_TOKEN: A JWT token signed with a shared secret that authorises a given license request.
  • TENANT_CODENAME: Tenant name, retrieved from the videokit.cloud dashboard.

FairplayLink Icon

1var source = {
2 hls: "HLS_MANIFEST_URL",
3 drm: {
4 fairplay: {
5 certificateURL:
6 "https://TENANT_CODENAME.la.drm.cloud/certificate/fairplay?brandGuid=BRAND_ID",
7 headers: {
8 "content-type": "application/x-www-form-urlencoded",
9 "x-drm-brandGuid": BRAND_ID,
10 "x-drm-usertoken": USER_TOKEN,
11 },
12 prepareContentId: (url) => {
13 const serverProcessSPCPath = url
14 .substring(1)
15 .replace("skd://", "https://");
16 const link = document.createElement("a");
17 link.href = serverProcessSPCPath;
18 return link.hostname;
19 },
20 prepareMessage: (event, session) => {
21 return (
22 "spc=" +
23 encodeURIComponent(event.messageBase64Encoded) +
24 "&assetId=" +
25 encodeURIComponent(session.contentId)
26 );
27 },
28 },
29 },
30};

Please replace the following placeholders in the code:

  • HLS_MANIFEST_URL: The URL to the HLS manifest (m3u8) file.
  • BRAND_ID: Your brand ID, retrieved from the videokit.cloud dashboard.
  • USER_TOKEN: A JWT token signed with a shared secret that authorises a given license request.
  • TENANT_CODENAME: Tenant name, retrieved from the videokit.cloud dashboard.

For Fairplay, the License Acquisition URL should be within the HLS Multi-variant manifest.

Complete example for Widevine, PlayReady and FairPlayLink Icon

1var source = {
2 dash: "DASH_MANIFEST_URL",
3 hls: "HLS_MANIFEST_URL",
4 drm: {
5 widevine: {
6 LA_URL:
7 "https://TENANT_CODENAME.la.drm.cloud/acquire-license/widevine?brandGuid=BRAND_ID&userToken=USER_TOKEN",
8 },
9 playready: {
10 LA_URL:
11 "https://TENANT_CODENAME.la.drm.cloud/acquire-license/playready?brandGuid=BRAND_ID&userToken=USER_TOKEN",
12 },
13 fairplay: {
14 certificateURL:
15 "https://TENANT_CODENAME.la.drm.cloud/certificate/fairplay?brandGuid=BRAND_ID",
16 headers: {
17 "content-type": "application/x-www-form-urlencoded",
18 "x-drm-brandGuid": BRAND_ID,
19 "x-drm-usertoken": USER_TOKEN,
20 },
21 prepareContentId: (url) => {
22 const serverProcessSPCPath = url
23 .substring(1)
24 .replace("skd://", "https://");
25 const link = document.createElement("a");
26 link.href = serverProcessSPCPath;
27 return link.hostname;
28 },
29 prepareMessage: (event, session) => {
30 return (
31 "spc=" +
32 encodeURIComponent(event.messageBase64Encoded) +
33 "&assetId=" +
34 encodeURIComponent(session.contentId)
35 );
36 },
37 },
38 },
39};

Please replace the following placeholders in the code:

  • DASH_MANIFEST_URL: The URL to the DASH manifest (MPD) file.
  • HLS_MANIFEST_URL: The URL to the HLS manifest (M3U8) file.
  • BRAND_ID: Your brand ID, retrieved from the videokit.cloud dashboard.
  • TENANT_CODENAME: Tenant name, retrieved from the videokit.cloud dashboard.
  • USER_TOKEN: A JWT token signed with a shared secret that authorises a given license request.

Give us feedback