KeyOS / BuyDRM

Overview

Bradmax player supports integration with KeyOS DRM provider. From player perspective it is matter of passing right configuration.

Your web server has to generate Authentication XML for user, who need access to selected media. It will be used as “pass” for License server for obtaining license. With this license, player will be able to decode encrypted video.

For more details how to generate Authentication XML please contact with KeyOS.

Configuration

For correct playback player needs:

  • Authentication XML encoded as base64 string
  • PlayReady license server URL
  • Widevine license server URL
  • FairPlay license server URL
  • FairPlay license server certificate URL.

DRM configuration object

You need to prepare drm configuration object and set it for each media source object . Each media source points to single HLS, MPEG-DASH, MSSmoothStreaming stream. drm object specification:

Field nameTypeDescription
providerstringKey defining provider. For KeyOS/BuyDRM should be “keyos”.
playreadyobjectPlayReady configuration object. See keys below.
playready.laUrlstringURL address for PlayReady license server.
playready.customDatastringAuthentication XML encoded as base64 string.
widevineobjectWidevine configuration object. See keys below.
widevine.laUrlstringURL address for Widevine license server.
widevine.customDatastringAuthentication XML encoded as base64 string.
widevine.audioRobustnessstringRobustness level for DRM. Default: SW_SECURE_CRYPTO
widevine.videoRobustnessstringRobustness level for DRM. Default: SW_SECURE_CRYPTO
fairplayobjectFairPlay configuration object. See keys below.
fairplay.laUrlstringURL address for FairPlay license server.
fairplay.certUrlstringURL address for FairPlay license server certificate.
fairplay.customDatastringAuthentication XML encoded as base64 string.

Example

// DRM configuration.
var authenticationXmlBase64Encoded = "PEtleU9TQXV0aGVudGljYXRpb25YTUw+PERhdGE+PEdlbmVyYXRpb25UaW1lPjIwMTYtMTEtMTkgMDk6MzQ6MDEuOTkyPC9HZW5lcmF0aW9uVGltZT48RXhwaXJhdGlvblRpbWU+MjAyNi0xMS0xOSAwOTozNDowMS45OTI8L0V4cGlyYXRpb25UaW1lPjxVbmlxdWVJZD4wZmZmMTk3YWQzMzQ0ZTMyOWU0MTA0OTIwMmQ5M2VlYzwvVW5pcXVlSWQ+PFJTQVB1YktleUlkPjdlMTE0MDBjN2RjY2QyOWQwMTc0YzY3NDM5N2Q5OWRkPC9SU0FQdWJLZXlJZD48V2lkZXZpbmVQb2xpY3kgZmxfQ2FuUGxheT0idHJ1ZSIgZmxfQ2FuUGVyc2lzdD0iZmFsc2UiIC8+PFdpZGV2aW5lQ29udGVudEtleVNwZWMgVHJhY2tUeXBlPSJIRCI+PFNlY3VyaXR5TGV2ZWw+MTwvU2VjdXJpdHlMZXZlbD48L1dpZGV2aW5lQ29udGVudEtleVNwZWM+PEZhaXJQbGF5UG9saWN5IC8+PExpY2Vuc2UgdHlwZT0ic2ltcGxlIiAvPjwvRGF0YT48U2lnbmF0dXJlPk1sNnhkcU5xc1VNalNuMDdicU8wME15bHhVZUZpeERXSHB5WjhLWElBYlAwOE9nN3dnRUFvMTlYK1c3MDJOdytRdmEzNFR0eDQydTlDUlJPU1NnREQzZTM4aXE1RHREcW9HelcwS2w2a0JLTWxHejhZZGRZOWhNWmpPTGJkNFVkRnJUbmxxU21raC9CWnNjSFljSmdaUm5DcUZIbGI1Y0p0cDU1QjN4QmtxMUREZUEydnJUNEVVcVJiM3YyV1NueUhGeVZqWDhCR3o0ZWFwZmVFeDlxSitKbWI3dUt3VjNqVXN2Y0Fab1ozSHh4QzU3WTlySzRqdk9Wc1I0QUd6UDlCc3pYSXhKd1ZSZEk3RXRoMjhZNXVEQUVZVi9hZXRxdWZiSXIrNVZOaE9yQ2JIVjhrR2praDhHRE43dC9nYWh6OWhVeUdOaXRqY2NCekJvZHRnaXdSUT09PC9TaWduYXR1cmU+PC9LZXlPU0F1dGhlbnRpY2F0aW9uWE1MPg==";
var drmConfig = {
    "provider": "keyos",
    "playready": {
        "laUrl": "https://pr-keyos.licensekeyserver.com/core/rightsmanager.asmx",
        "customData": authenticationXmlBase64Encoded
    },
    "widevine": {
        "laUrl": "https://wv-keyos.licensekeyserver.com",
        "customData": authenticationXmlBase64Encoded
    },
    "fairplay": {
        "laUrl": "https://fp-keyos.licensekeyserver.com/getkey",
        "customData": authenticationXmlBase64Encoded,
        "certUrl": "https://fp-keyos.licensekeyserver.com/cert/7e11400c7dccd29d0174c674397d99dd.der"
    }
};

// Setting DRM configuration into player dataProvider object.
var options = {
    "dataProvider": {
        "source": [
            {
                "url": "https://d2jl6e4h8300i8.cloudfront.net/netflix_meridian/4k-18.5!9/keyos-logo/g180-avc_a2.0-vbr-aac-128k/r30/dash-wv-pr/stream.mpd",
                "drm": drmConfig
            },
            {
                "url": "https://d2jl6e4h8300i8.cloudfront.net/netflix_meridian/4k-19.5!9/keyos-logo/g180-avc_a2.0-vbr-aac-128k/r30/hls-fp/master.m3u8",
                "drm": drmConfig
            }
        ],
        "duration": 718,
        "title": "Meridian",
        "splashImages": [
            {
                "height": 397,
                "url": "https://bradmax.com/static/images/startsplash.jpg",
                "width": 955
            }
        ]
    }
};
var element = document.getElementById("player");
window.bigsoda.player.create(element, options);

Demo

Working demo for sample above you can find on page: https://bradmax.com/static/bradmax-drm-providers-demo/keyos.html