Skip to main content
Version: 11.11.0

DRM on iOS

THEOplayer supports FairPlay, PlayReady and Widevine by default. To use these DRM systems, you will need to pass a DRM configuration along with the source object. We are partnered with many multi-DRM vendors to make it as easy as possible to get your DRM streams running.

Integrations​

These DRM vendors can be used through an integration. An integration is not part of the SDK: it is added on top of it as a custom DRM integration. Ready-made integrations for many vendors are available in the DRM integration samples repository. Vendors which don't require custom license or certificate requests can be used with a plain key system configuration instead.

  • Offline DRM: how to implement playback of downloadable content-protected streams.
  • Multi-key HLS: how to serve one HLS stream to all key systems.

Custom configuration​

Developers can use the generic DRM-functionalities in case in-house DRM-solutions are used, or services from DRM-vendors for which no integration is available.

To configure DRM on the iOS SDK, developers can put a FairPlayDRMConfiguration inside a SourceDescription.

// let headers = [["<KEY>": "<VALUE>"]]
let drmConfiguration = FairPlayDRMConfiguration(
licenseAcquisitionURL: "<LICENSE_KEY_URL_FAIRPLAY>",
certificateURL: "<CERTIFICATE_URL>"
// , headers: headers, licenseType: <LICENSE_TYPE>
)
let typedSource = TypedSource(src: "<HLS_STREAM_URL>", type: "application/x-mpegurl", drm: drmConfiguration)
let sourceDescription = SourceDescription(source: typedSource)
theoplayer.source = sourceDescription

Custom integration​

Developers can make their own custom DRM integration for any DRM vendor. This can be done by making use of the DRM integration API repository.

A complete guide on how to create a new integration, and some example integrations can be found in the provided repository.