# 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](#custom-integration). Ready-made integrations for many vendors are available in the [DRM integration samples repository](https://github.com/THEOplayer/samples-drm-integration). Vendors which don't require custom license or certificate requests can be used with a plain key system configuration instead.

* [Arris Titanium](https://docs-preview.optiview.dolby.com/pr-860/theoplayer/how-to-guides/ios/drm/arris-titanium.md)
* [Axinom](https://docs-preview.optiview.dolby.com/pr-860/theoplayer/how-to-guides/ios/drm/axinom.md)
* [BuyDRM KeyOS](https://docs-preview.optiview.dolby.com/pr-860/theoplayer/how-to-guides/ios/drm/buydrm-keyos.md)
* [castLabs DRMToday](https://docs-preview.optiview.dolby.com/pr-860/theoplayer/how-to-guides/ios/drm/castlabs-drmtoday.md)
* [DoveRunner](https://docs-preview.optiview.dolby.com/pr-860/theoplayer/how-to-guides/ios/drm/doverunner.md)
* [EZDRM](https://docs-preview.optiview.dolby.com/pr-860/theoplayer/how-to-guides/ios/drm/ezdrm.md)
* [Intertrust ExpressPlay](https://docs-preview.optiview.dolby.com/pr-860/theoplayer/how-to-guides/ios/drm/intertrust-expressplay.md)
* [Irdeto](https://docs-preview.optiview.dolby.com/pr-860/theoplayer/how-to-guides/ios/drm/irdeto.md)
* [Microsoft Azure](https://docs-preview.optiview.dolby.com/pr-860/theoplayer/how-to-guides/ios/drm/microsoft-azure.md)
* [Uplynk](https://docs-preview.optiview.dolby.com/pr-860/theoplayer/how-to-guides/ios/drm/uplynk.md)
* [Verimatrix MultiRights](https://docs-preview.optiview.dolby.com/pr-860/theoplayer/how-to-guides/ios/drm/verimatrix-multirights.md)
* [Vimond](https://docs-preview.optiview.dolby.com/pr-860/theoplayer/how-to-guides/ios/drm/vimond.md)
* [Vualto VuDRM](https://docs-preview.optiview.dolby.com/pr-860/theoplayer/how-to-guides/ios/drm/vualto-vudrm.md)
* [Xstream](https://docs-preview.optiview.dolby.com/pr-860/theoplayer/how-to-guides/ios/drm/xstream.md)

## Other guides

* [Offline DRM](https://docs-preview.optiview.dolby.com/pr-860/theoplayer/how-to-guides/ios/drm/offline-drm.md): how to implement playback of downloadable content-protected streams.
* [Multi-key HLS](https://docs-preview.optiview.dolby.com/pr-860/theoplayer/how-to-guides/ios/drm/multikey-hls.md): 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.

```swift
// 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](https://github.com/THEOplayer/samples-drm-integration).

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