Playing protected content with Irdeto

Overview

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 Verimatrix or Irdeto, 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.

Widevine

const source = {
  dash: 'DASH_MANIFEST_URL',
  drm: {
    widevine: {
      LA_URL: 'WIDEVINE_LA_URL',
      headers: { privateData: 'cookie=VUID' },
    }
  }
};

Please replace the following placeholders in the code:

  • DASH_MANIFEST_URL: The MPEG-DASH manifest (MPD) URL.
  • WIDEVINE_LA_URL: The Widevine license server URL.
  • VUID: The VUID data to send to the DRM server to authenticate.

Playready

const source = {
  dash: 'DASH_MANIFEST_URL',
  drm: {
    playready: {
      LA_URL: 'PLAYREADY_LA_URL',
      headers: { privateData: 'cookie=PRIVATE_DRM_DATA' },
    }
  }
};

Please replace the following placeholders in the code:

  • DASH_MANIFEST_URL: The MPEG-DASH manifest (MPD) URL.
  • PLAYREADY_LA_URL: The PlayReady license server URL.
  • PRIVATE_DRM_DATA: The private data to send to the DRM server to authenticate. Also known as VUID.

Fairplay

const source = {
  hls: 'HLS_MANIFEST_URL',
  drm: {
    fairplay: {
      certificateURL: 'CERTIFICATE_URL',
      LA_URL: 'FPS_LA_URL',
      prepareContentId: contentId => contentId.match(/ContentId=([^&]+)/)[1],
      prepareMessage: event => new Uint8Array(event.message),
      prepareLicense: license => new Uint8Array(license),
      licenseResponseType: 'arraybuffer'
    }
  }
};

Please replace the following placeholders in the code:

  • HLS_MANIFEST_URL: The URL to the HLS manifest (M3U8) file.
  • FPS_LA_URL: The FairPlay license server URL.
  • CERTIFICATE_URL: The URL to the Fairplay certificate. This needs to be accessible for the player.

Complete Player Configuration Example for Multi-DRM

const source = {
  dash: 'DASH_MANIFEST_URL',
  hls: 'HLS_MANIFEST_URL',
  drm: {
    widevine: {
      LA_URL: 'WIDEVINE_LA_URL'
    },
    playready: {
      LA_URL: 'PLAYREADY_LA_URL'
    },
    fairplay: {
      certificateURL: 'CERTIFICATE_URL',
      LA_URL: 'FPS_LA_URL',
      prepareContentId: contentId => contentId.match(/ContentId=([^&]+)/)[1],
      prepareMessage: event => new Uint8Array(event.message),
      prepareLicense: license => new Uint8Array(license),
      licenseResponseType: 'arraybuffer'
    }
  }
};

Please replace the following placeholders in the code:

  • DASH_MANIFEST_URL: The MPEG-DASH manifest (MPD) URL.
  • HLS_MANIFEST_URL: The URL to the HLS manifest (M3U8) file.
  • WV_LA_URL: The Widevine license server URL.
  • PR_LA_URL: The PlayReady license server URL.
  • FPS_LA_URL: The FairPlay license server URL.
  • FPS_CERTIFICATE_URL: The URL to the Fairplay certificate. This needs to be accessible for the player.