DRM protected playback
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.
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.
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().
