BuyDRM is a studio approved full spectrum DRM technology platform with encryption, license delivery and playback on consumer platforms. Radiant Media Player is compatible with BuyDRM 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 BuyDRM with Radiant Media Player.
First, you will need an account with BuyDRM 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 BuyDRM with Radiant Media Player.
<script src="https://cdn.radiantmediatechs.com/rmp/5.12.5/js/rmp.min.js"></script> <div id="rmpPlayer"></div> <script> // DASH streaming URL var src = { dash: 'https://your-dash-url.mpd' }; // BuyDRM license server for PlayReady var playReadyLaURL = 'https://buydrm-license-server-url-playready'; // BuyDRM license server for Widevine var widevineLaURL = 'https://buydrm-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 BuyDRM data shakaDrm: { servers: { "com.widevine.alpha": widevineLaURL, "com.microsoft.playready": playReadyLaURL } }, shakaRequestConfiguration: { license: { headers: { 'customdata': 'BASE64_ENCODED_CUSTOM_DATA' } } } }; rmp.init(settings); </script>
We also support FairPlay streaming with BuyDRM to Radiant Media Player. FairPlay streaming, which requires HLS, aims at providing support for DRM encrypted content to Apple devices. For Radiant Media Player, this is macOS Safari 10+, Safari for iOS 11.2+ and iPadOS 13+ and iOS 13+ and iPadOS 13+ WebView. More information about FPS support in Radiant Media Player can be found here.
<script src="https://cdn.radiantmediatechs.com/rmp/5.12.5/js/rmp.min.js"></script> <div id="rmpPlayer"></div> <script> var src = { fps: 'https://fps-hls-url.m3u8' }; // BuyDRM FPS configuration - replace certificatePath, processSpcPath, licenseRequestHeaders with your values var fpsDrm = { certificatePath: 'https://fp-keyos.licensekeyserver.com/cert/xxxxxxxxxxxxxxxxxxxxxxx.der', processSpcPath: 'https://fp-keyos.licensekeyserver.com/getkey', licenseRequestHeaders: [{ name: 'customdata', value: 'license xxxxxxxxxxxxxxxxxxxxxx' }], extractContentId: function (initData) { var arrayToString = function (array) { var uint16array = new Uint16Array(array.buffer); return String.fromCharCode.apply(null, uint16array); }; var contentId = arrayToString(initData); var idx = contentId.indexOf('skd://'); if (idx > -1) { return contentId.substring(8, 40); } throw "Invalid Content ID format. The format of the Content ID must be the following: skd://xxx where xxx is the Key ID in hex format."; } }; 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: fpsDrm }; var elementID = 'rmpPlayer'; var rmp = new RadiantMP(elementID); rmp.init(settings); </script>
©2015-2021 Radiant Media Player. All rights reserved.