Security

快速入門: 申請 DRM 許可證

(以下內容均翻譯自英文版文件,最新資訊及內容敬請切換至英文語系參考原文)

 

開始之前

  1. 請確保您已準備好 BlendVision One 串流內容。您可以通過兩種方式準備您的內容,並確保您已參照  數位版權管理 啓用 DRM 設置
  2. 請確保您已根據 產生資源/播放令牌以啟用內容播放 從 BlendVision One 取得了 playback_token

 

如何向 BlendVision One 申請 DRM 許可證

FairPlay

步驟 1. 取得服務許可證書

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

步驟 2. 取得許可證 

Key Value
x-custom-data token_type=upfront&token_value=[playback_token]
    • Body
      • 選項 1 (推薦)
Type Value
JSON

{

    "spc": [base64 standard encoded SPC message]

}

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

 

程式碼範例

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

步驟 1. 取得許可證

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

 

程式碼範例

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

步驟 1. 取得許可證

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"

 

程式碼範例

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)

 

工作流程序列圖:

BvOneDrmUpfront-Page-2.drawio

 

更新於