CONNECT Player SDK 5 for Browsers and Connected TV
5.28.x 5.27.x 5.26.x 5.25.x 5.24.x 5.23.x 5.22.x 5.21.x 5.20.x 5.19.x 5.18.x 5.17.x 5.16.x 5.15.x 5.14.x 5.13.x 5.12.x 5.11.x 5.10.x 5.9.x 5.7.x 5.6.x 5.5.x 5.4.x 5.3.x 5.2.x
5.28.x 5.27.x 5.26.x 5.25.x 5.24.x 5.23.x 5.22.x 5.21.x 5.20.x 5.19.x 5.18.x 5.17.x 5.16.x 5.15.x 5.14.x 5.13.x 5.12.x 5.11.x 5.10.x 5.9.x 5.7.x 5.6.x 5.5.x 5.4.x 5.3.x 5.2.x

DRM protected playback

To test this feature and view the example code, please see the

Browsers and Connected TV SDK 5 Example Code Quick Start

guide.

Configuring the otvtoolkit plugin for DRM

To enable DRM, add the appropriate parameters to the options object; these will vary for SSP and Conax integrations.

JavaScript
var drmSystem = null;
if (
  window.navigator.userAgent.indexOf("Safari") !== -1 &&
  window.navigator.userAgent.indexOf("Chrome") === -1
) {
  if (fairPlayMode === undefined || fairPlayMode === "nagra-ssp-fps") {
    drmSystem = {
      system: "nagra-ssp-fps",
      config: {
        tenantId: myTenantId,
        licenceServer: fairplayLicenceServerUrl
      }
    };
  } else if (fairPlayMode === "nagra-conax-fps") {
    drmSystem = {
      system: "nagra-conax-fps",
      config: {
        portalURL: conaxPortalUrl,
        certificatesURL: conaxCertificateUrl,
        licenceServer: conaxLicenceServerUrl
      }
    };
  }
} else {
  drmSystem = {
    system: "nagra-ssp",
    config: {
      mode: "token",
      tenantId: myTenantId,
      licenceServer: sspLicenceServerUrl
    }
  };
}

Then initialise theotvtoolkit.

JavaScript
let playerInstance = otvplayer(
    "videoPlayer",
    // options
    {
        plugins: {
            otvtoolkit: {
                drm: drmSystem
            }
        }
    },
    // loaded callback
    function loadedCallback() {
    ...
    }
);

The drm section of the otvtoolkit plugin contains the name of the DRM system (in this case, nagra-ssp, nagra-ssp-fps or nagra-conax) and a system-specific configuration object.

Because the otvtoolkit plugin is configured by the options object, you do not need to initialise the toolkit in loadedCallback().