[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

Setup the Bitmovin Player with BuyDRM Service

OverviewLink Icon

If you are not sure what DRM is, you want have an overview and get started, please have a look at our DRM Setup Guide.

Nearly every license provider, such as Irdeto or BuyDRM, requires a few special information being sent to the DRM license server, or responds with a proprietary format. Instead of integrating a few license providers into the core of our player, we decided to provide necessary configuration options via the player configuration.


WidevineLink Icon

1var conf = {
2 key: "YOUR-PLAYER-KEY-HERE",
3 source: {
4 dash: "DASH_MANIFEST_URL",
5 drm: {
6 widevine: {
7 LA_URL: "http://widevine.licensekeyserver.com",
8 headers : [{
9 name: "customdata",
10 value: "BASE64_ENCODED_CUSTOM_DATA";
11 }]
12 }
13 }
14 }
15};

Please replace the following placeholders in the code:

  • DASH_MANIFEST_URL: The URL to the DASH manifest (MPD) file.
  • BASE64_ENCODED_CUSTOM_DATA: BuyDRM authentication XML in base64 encoded format to send along with the license request.

PlayReadyLink Icon

1var conf = {
2 key: "YOUR-PLAYER-KEY-HERE",
3 source: {
4 dash: "DASH_MANIFEST_URL",
5 drm: {
6 playready: {
7 LA_URL: "http://sldrm.licensekeyserver.com/core/rightsmanager.asmx",
8 headers : [{
9 name: "customdata",
10 value: "BASE64_ENCODED_CUSTOM_DATA";
11 }]
12 }
13 }
14 }
15};

Please replace the following placeholders in the code:

  • DASH_MANIFEST_URL: The URL to the DASH manifest (MPD) file.
  • BASE64_ENCODED_CUSTOM_DATA: BuyDRM authentication XML in base64 encoded format to send along with the license request.

FairPlayLink Icon

1var conf = {
2 key: "YOUR-PLAYER-KEY-HERE",
3 source: {
4 hls: "HLS_MANIFEST_URL",
5 drm: {
6 fairplay: {
7 LA_URL: "https://fp-keyos.licensekeyserver.com/getkey",
8 certificateURL: "CERTIFICATE_URL",
9 headers: [{
10 name: "customdata",
11 value: "BASE64_ENCODED_CUSTOM_DATA"
12 }],
13 prepareMessage : function(event, session) {
14 return "spc=" + encodeURIComponent(event.messageBase64Encoded) + "&assetId=" + session.contentId;
15 },
16 prepareContentId : function(contentId) {
17 var idx = contentId.indexOf("skd://");
18 if (idx > -1) {
19 return contentId.substring(8, 40);
20 }
21
22 throw "Invalid Content ID format. The format of the Content ID must be the following: skd://xxx where xxx is the Key ID in hex format.";
23 }
24 }
25 }
26 }
27};

Please replace the following placeholders in the code:

  • HLS_MANIFEST_URL: The URL to the HLS manifest (M3U8) file.
  • BASE64_ENCODED_CUSTOM_DATA: BuyDRM authentication XML in base64 encoded format to send along with the license request.
  • CERTIFICATE_URL: The URL to the FairPlay certificate as provided by BuyDRM

Complete example for Widevine, PlayReady and FairPlayLink Icon

1var conf = {
2 key: "YOUR-PLAYER-KEY-HERE",
3 source: {
4 dash: "DASH_MANIFEST_URL",
5 hls: "HLS_MANIFEST_URL",
6 drm: {
7 playready: {
8 LA_URL: "http://sldrm.licensekeyserver.com/core/rightsmanager.asmx",
9 headers : [{
10 name: "customdata",
11 value: "BASE64_ENCODED_CUSTOM_DATA";
12 }]
13 },
14 widevine: {
15 LA_URL: "http://widevine.licensekeyserver.com",
16 headers : [{
17 name: "customdata",
18 value: "BASE64_ENCODED_CUSTOM_DATA";
19 }]
20 },
21 fairplay: {
22 LA_URL: "https://fp-keyos.licensekeyserver.com/getkey",
23 certificateURL: "CERTIFICATE_URL",
24 headers: [{
25 name: "customdata",
26 value: "BASE64_ENCODED_CUSTOM_DATA"
27 }],
28 prepareMessage : function(event, session) {
29 return "spc=" + encodeURIComponent(event.messageBase64Encoded) + "&assetId=" + session.contentId;
30 },
31 prepareContentId : function(contentId) {
32 var idx = contentId.indexOf("skd://");
33 if (idx > -1) {
34 return contentId.substring(8, 40);
35 }
36
37 throw "Invalid Content ID format. The format of the Content ID must be the following: skd://xxx where xxx is the Key ID in hex format.";
38 }
39 }
40 }
41 }
42};

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.
  • BASE64_ENCODED_CUSTOM_DATA: BuyDRM authentication XML in base64 encoded format to send along with the license request.
  • CERTIFICATE_URL: The URL to the FairPlay certificate as provided by BuyDRM

Give us feedback