Playing Protected Content with Axinom DRM (Web)

Learn how to integrate Axinom DRM with the Bitmovin Web Player SDK for Widevine, PlayReady, and FairPlay.

Overview

Axinom DRM is a robust multi-DRM service that provides a single, easy-to-use unified API compatible with Microsoft PlayReady, Apple FairPlay, and Google Widevine. It works seamlessly across all major platforms, devices, and video players.
This guide explains how to integrate Axinom DRM with Bitmovin Player using the Bitmovin Web Player SDK for secure, token-based license acquisition and playback.

For more information about Axinom DRM, refer to:


Prerequisites

Before integrating Axinom DRM with Bitmovin Player, ensure you have:

  • A valid Bitmovin Player license key.
  • An active Axinom DRM account with access to the Axinom Mosaic Portal.
  • Content packaged with Widevine, PlayReady, and/or FairPlay encryption keys.
  • A backend service capable of generating Axinom DRM JWT license tokens.
    These tokens authorize playback and are typically short-lived for security.

Widevine Integration

const source = {
  dash: '<DASH_MANIFEST_URL>',
  drm: {
    widevine: {
      LA_URL: 'https://<ACCOUNT_SPECIFIC_PREFIX>.drm-widevine-licensing.axprod.net/AcquireLicense',
      headers: {
        'X-AxDRM-Message': '<LICENSE_TOKEN>',
      },
    },
  },
};

Replace placeholders:

  • <DASH_MANIFEST_URL> — URL to your DASH manifest (MPD).
  • <ACCOUNT_SPECIFIC_PREFIX> — Your Axinom account prefix.
    To locate it, open the Axinom Mosaic PortalLicense Service configWidevine API.
  • <LICENSE_TOKEN> — A signed JWT from your backend authorizing the license request.
    Learn more about Axinom License Tokens.

PlayReady Integration

const source = {
  dash: '<DASH_MANIFEST_URL>',
  drm: {
    playready: {
      LA_URL: 'https://<ACCOUNT_SPECIFIC_PREFIX>.drm-playready-licensing.axprod.net/AcquireLicense',
      headers: {
        'X-AxDRM-Message': '<LICENSE_TOKEN>',
      },
    },
  },
};

Replace placeholders:

  • <DASH_MANIFEST_URL> — URL to your DASH manifest (MPD).
  • <ACCOUNT_SPECIFIC_PREFIX> — Found under License Service config → PlayReady API in your Axinom portal.
  • <LICENSE_TOKEN> — A signed JWT generated by your backend, authorizing license acquisition.

FairPlay Integration

const source = {
  hls: '<HLS_MANIFEST_URL>',
  drm: {
    fairplay: {
      LA_URL: 'https://<ACCOUNT_SPECIFIC_PREFIX>.drm-fairplay-licensing.axprod.net/AcquireLicense',
      certificateURL: '<YOUR_FAIRPLAY_CERTIFICATE>',
      headers: {
        'X-AxDRM-Message': '<LICENSE_TOKEN>',
      },
      prepareContentId: (uri) => uri.split('skd://')[1],
      prepareLicenseAsync: (ckc) =>
        new Promise((resolve, reject) => {
          const reader = new FileReader();
          reader.addEventListener('loadend', () => resolve(new Uint8Array(reader.result)));
          reader.addEventListener('error', () => reject(reader.error));
          reader.readAsArrayBuffer(ckc);
        }),
      prepareMessage: (event) => new Blob([event.message], { type: 'application/octet-binary' }),
      useUint16InitData: true,
      licenseResponseType: 'blob',
    },
  },
};

Replace placeholders:

  • <HLS_MANIFEST_URL> — URL to your HLS manifest (M3U8).
  • <ACCOUNT_SPECIFIC_PREFIX> — Found under License Service config → FairPlay API in your Axinom portal.
  • <YOUR_FAIRPLAY_CERTIFICATE> — The URL of your FairPlay certificate. See the Axinom FairPlay Certificate Guide.
  • <LICENSE_TOKEN> — A signed JWT from your backend authorizing the FairPlay license request.

Complete Example (Widevine, PlayReady, and FairPlay)

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Bitmovin Player with Axinom DRM</title>
    <meta charset="utf-8" />
    <script src="https://cdn.bitmovin.com/player/web/8/bitmovinplayer.js"></script>
  </head>
  <body>
    <h2>Bitmovin Player with Axinom DRM</h2>
    <div id="my-player"></div>

    <script>
      const playerConfig = {
        key: '<BITMOVIN_PLAYER_KEY>',
      };

      const videoElement = document.getElementById('my-player');
      const player = new bitmovin.player.Player(videoElement, playerConfig);

      const source = {
        dash: '<DASH_MANIFEST_URL>',
        hls: '<HLS_MANIFEST_URL>',
        drm: {
          widevine: {
            LA_URL: 'https://<ACCOUNT_SPECIFIC_PREFIX>.drm-widevine-licensing.axprod.net/AcquireLicense',
            headers: {
              'X-AxDRM-Message': '<LICENSE_TOKEN_FOR_DASH>',
            },
          },
          playready: {
            LA_URL: 'https://<ACCOUNT_SPECIFIC_PREFIX>.drm-playready-licensing.axprod.net/AcquireLicense',
            headers: {
              'X-AxDRM-Message': '<LICENSE_TOKEN_FOR_DASH>',
            },
          },
          fairplay: {
            LA_URL: 'https://<ACCOUNT_SPECIFIC_PREFIX>.drm-fairplay-licensing.axprod.net/AcquireLicense',
            certificateURL: '<YOUR_FAIRPLAY_CERTIFICATE>',
            headers: {
              'X-AxDRM-Message': '<LICENSE_TOKEN_FOR_HLS>',
            },
            prepareContentId: (uri) => uri.split('skd://')[1],
            prepareLicenseAsync: (ckc) =>
              new Promise((resolve, reject) => {
                const reader = new FileReader();
                reader.addEventListener('loadend', () => resolve(new Uint8Array(reader.result)));
                reader.addEventListener('error', () => reject(reader.error));
                reader.readAsArrayBuffer(ckc);
              }),
            prepareMessage: (event) => new Blob([event.message], { type: 'application/octet-binary' }),
            useUint16InitData: true,
            licenseResponseType: 'blob',
          },
        },
      };

      player.load(source);
    </script>
  </body>
</html>

Replace placeholders:

  • <BITMOVIN_PLAYER_KEY> — Your Bitmovin Player license key.
  • <DASH_MANIFEST_URL> — URL to your DASH manifest (MPD).
  • <HLS_MANIFEST_URL> — URL to your HLS manifest (M3U8).
  • <ACCOUNT_SPECIFIC_PREFIX> — Your Axinom account prefix, found in the Axinom Mosaic Portal.
  • <LICENSE_TOKEN_FOR_DASH> — A signed JWT for DASH playback (Widevine and PlayReady).
  • <LICENSE_TOKEN_FOR_HLS> — A signed JWT for HLS playback (FairPlay).
  • <YOUR_FAIRPLAY_CERTIFICATE> — URL to your FairPlay certificate.

Testing and Troubleshooting

  • Verify playback using the Bitmovin Player Demo Portal.
  • Check that your license tokens are valid and not expired.
  • Confirm that your content keys match those configured in Axinom DRM.
  • If playback fails, open browser DevTools → Network tab → check DRM license requests and responses.
  • Refer to Axinom DRM Bitmovin Player Integration Guide for troubleshooting examples.

Summary

With this setup, Bitmovin Player can play DRM-protected content secured by Axinom DRM, supporting:

  • Widevine — Chrome and Android.
  • PlayReady — Edge and Windows.
  • FairPlay — Safari, iOS, and macOS.

Axinom DRM’s unified API simplifies multi-DRM integration while maintaining license token security, playback compliance, and cross-platform compatibility.