> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://fastpix.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://fastpix.com/docs/_mcp/server.

# Play DRM-protected content

> Learn how to play DRM-encrypted videos in the FastPix iOS Player using Apple FairPlay.

Learn how to play DRM-encrypted videos in the FastPix iOS Player using Apple FairPlay.

The FastPix iOS Player supports DRM-encrypted playback through FairPlay. To enable DRM, you need to provide a playback token, a DRM license URL, and a FairPlay application certificate URL.

For a complete guide on setting up DRM, see [Secure playback with DRM](/docs/video-security/set-up-drm-encryption#/).

## Play a DRM-protected video

Construct the license and certificate URLs using your playback ID and token, then pass them as `DRMOptions`:

```swift
if let token = self.playbackToken {
    let licenseURL = URL(string: "https://api.fastpix.com/v1/on-demand/drm/license/fairplay/\(self.playbackID)?token=\(token)")!
    let certificateURL = URL(string: "https://api.fastpix.com/v1/on-demand/drm/cert/fairplay/\(self.playbackID)?token=\(token)")!

    playerViewController.prepare(
        playbackID: playbackID,
        playbackOptions: PlaybackOptions(
            playbackToken: token,
            drmOptions: DRMOptions(
                licenseURL: licenseURL,
                certificateURL: certificateURL
            )
        )
    )
}
```

## Required parameters

* **`playbackToken`**: A valid JWT token that authorizes playback.
* **`licenseURL`**: The URL for the FairPlay DRM license server.
* **`certificateURL`**: The URL for the FairPlay application certificate.

> **Note:** Spritesheet-based seek preview thumbnails are fully supported for DRM-protected content. The SDK handles secure fetching and rendering of spritesheet assets without exposing protected URLs.