Security

Quickstart: Request DRM license

Before We Start

  1. Ensure that you have prepared your BlendVision One streaming content. You can prepare your content in two ways and be sure you are enable DRM setting according to Digital Right Management
  2. Ensure that you have gotten the playback_token from BlendVision One according to Generate Resource Token and Playback Token to Enable Content Playback

 

How to request the DRM license from BlendVision One

FairPlay

Step 1. Get service certificate

Key Value
x-custom-data token_type=upfront&token_value=[playback_token]

Step 2. License acquisition 

Key Value
x-custom-data token_type=upfront&token_value=[playback_token]
    • Body
      • Option 1 (Suggested)
Type Value
JSON

{

    "spc": [base64 standard encoded SPC message]

}

      • Option 2
Type Value
Text spc=[base64 standard encoded SPC message]
      • Option 3
Type Value
byte array [binary array of FairPlay SPC, ex: 0x00 0x00 0x00 0x01 …]

 

Sample code

import createPlayer from '@blendvision/player' 
const config = {
  source: {
    // Set content URL with FairPlay DRM protection (m3u8Manifest)
    src: m3u8Manifest,
    drm: {
      fairplay: {
        licenseUri: "https://drm.platform.blendvision.com/api/v3/drm/license",        
        certificateUri: "https://drm.platform.blendvision.com/api/v3/drm/license/fairplay_cert"
        headers: { // Specify DRM request data
          'x-custom-data': `token_type=upfront&token_value=${playbackToken}`
        }
        certificateHeaders: {          
          'x-custom-data': `token_type=upfront&token_value=${playbackToken}`        
        }
      }
    }
  }
}
// Create the player
player = createPlayer(target, config)

 

 

Widevine

Step 1. License acquisition

Key Value
x-custom-data token_type=upfront&token_value=[playback_token]

 

Sample code

import createPlayer from '@blendvision/player'
const config = {
  source: {
    // Set content URL with Widevine DRM protection (mpdManifest)
    src: mpdManifest,
    drm: {
      widevine: {
        licenseUri: "https://drm.platform.blendvision.com/api/v3/drm/license",
        headers: { // Specify DRM request data
          'x-custom-data': `token_type=upfront&token_value=${playbackToken}`
        }
      }
    }
  }
}
// Create the player
player = createPlayer(target, config)

PlayReady

Step 1. License acquisition

Key Value
x-custom-data token_type=upfront&token_value=[playback_token]
Content-Type application/XML
soapaction "http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense"

 

Sample code

import createPlayer from '@blendvision/player'
const config = {
  source: {
    // Set content URL with PlayReady DRM protection (mpdManifest)
    src: mpdManifest,
    drm: {
      playready: {
        licenseUri: "https://drm.platform.blendvision.com/api/v3/drm/license",
        headers: { // Specify DRM request data
          'x-custom-data': `token_type=upfront&token_value=${playbackToken}`          
          'Content-Type': 'application/XML'          
          'soapaction': 'http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense'
        }
      }
    }
  }
}
// Create the player
player = createPlayer(target, config)

 

Workflow sequence diagram:

BvOneDrmUpfront-Page-2.drawio

 

Updated