Radiant Media Player

Working with Axinom DRM



Guide sections


Scope of support

Axinom DRM is highly scalable multi-DRM service in the cloud built on latest standards. Radiant Media Player is compatible with Axinom DRM technology to reliably deliver content with DASH with both Widevine and PlayReady DRM. Apple FairPlay Streaming is also supported. You can review our compatibility table for DRM with DASH or HLS streaming here.

This documentation will guide you on how to easily implement Axinom DRM with Radiant Media Player.


DASH with Widevine and PlayReady DRM

First, you will need an account with Axinom DRM and to prepare your content for DASH streaming with Widevine and PlayReady DRM. Radiant Media Player will take care of loading and parsing the DASH manifest, contacting the DRM licensing servers and displaying content when authorised. Our DASH streaming & DRM implementation is based on Shaka player. General documentation for DASH streaming with Radiant Media Player can be found here. General documentation for using DRM with Radiant Media Player can be found here. Below you will find a complete example for using Axinom DRM with Radiant Media Player.

<script src="https://cdn.radiantmediatechs.com/rmp/5.10.2/js/rmp.min.js"></script>
<div id="rmpPlayer"></div>
<script>
  // DASH streaming URL
  var src = {
    dash: 'https://your-dash-url.mpd'
  };
  // Axinom DRM license server for PlayReady
  var playReadyLaURL = 'https://axinom-drm-license-server-url-playready';
  // Axinom DRM license server for Widevine
  var widevineLaURL = 'https://axinom-drm-license-server-url-widevine';
  // create Radiant Media Player instance
  var elementID = 'rmpPlayer';
  var rmp = new RadiantMP(elementID);
  var settings = {
    licenseKey: 'your-license-key',
    src: src,
    width: 640,
    height: 360,
    contentMetadata: {
      poster: [
        'https://your-poster-url.jpg'
      ]
    },
    // here we pass our Axinom DRM data
    shakaDrm: {
      servers: {
        "com.widevine.alpha": widevineLaURL,
        "com.microsoft.playready": playReadyLaURL
      }
    }, 
    shakaRequestConfiguration: {
      license: {
        headers: {
          'X-AxDRM-Message': 'your-axinom-token' 
        }
      }
    }
  };
  rmp.init(settings);
</script>

Apple FairPlay streaming (FPS)

We also support FairPlay streaming with Axinom DRM to Radiant Media Player. FairPlay streaming, which requires HLS, aims at providing support for DRM encrypted content to Apple devices, for us this is macOS Safari 10+, Safari for iOS 11.2+, iPadOS 13+ and iOS 13+ WebView. More information about FPS support in Radiant Media Player can be found here.

<script src="https://cdn.radiantmediatechs.com/rmp/5.10.2/js/rmp.min.js"></script>
<div id="rmpPlayer"></div>
<script>
  var src = {
    fps: 'https://fps-hls-url.m3u8'
  };
  // we define our functions and variables to be passed to the player
  // this is specific to FairPlay streaming with Axinom DRM
  // extractContentId
  var arrayToString = function (array) {
    var uint16array = new Uint16Array(array.buffer);
    return String.fromCharCode.apply(null, uint16array);
  };
  var extractContentId = function (initData) {
    // "skd://{ContentID}" -> "{ContentID}"
    return arrayToString(initData).replace(/^.*:\/\//, '');
  };
  // licenseRequestMessage
  var licenseRequestMessage = function (message) {
    return message;
  };
  // licenseRequestLoaded
  var licenseRequestLoaded = function (event) {
    var request = event.target;
    var session = request.session;
    var arrayBuffer = request.response;
    key = new Uint8Array(arrayBuffer);
    session.update(key);
  };
  // processSpcPath
  var processSpcPath = 'https://drm-fairplay-licensing.axtest.net/AcquireLicense';
  // licenseRequestHeaders
  var licenseRequestHeaders = [
    {
      name: 'Content-type',
      value: 'application/octet-stream'
    },
    {
      name: 'X-AxDRM-Message',
      value: 'your-axinom-token'
    }
  ];
  var settings = {
    licenseKey: 'your-license-key',
    src: src,
    width: 640,
    height: 360,
    contentMetadata: {
      poster: [
        'https://your-poster-url.jpg'
      ]
    },
    // we pass here our FPS setting through fpsDrm object
    fpsDrm: {
      certificatePath: 'https://vtb.axinom.com/FPScert/fairplay.cer',
      processSpcPath: processSpcPath,
      licenseResponseType: 'arraybuffer',
      licenseRequestHeaders: licenseRequestHeaders,
      extractContentId: extractContentId,
      licenseRequestMessage: licenseRequestMessage,
      licenseRequestLoaded: licenseRequestLoaded
    }
  };
  var elementID = 'rmpPlayer';
  var rmp = new RadiantMP(elementID);
  rmp.init(settings);
</script>
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License.