Play DRM-protected content

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.

Play a DRM-protected video

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

1if let token = self.playbackToken {
2 let licenseURL = URL(string: "https://api.fastpix.com/v1/on-demand/drm/license/fairplay/\(self.playbackID)?token=\(token)")!
3 let certificateURL = URL(string: "https://api.fastpix.com/v1/on-demand/drm/cert/fairplay/\(self.playbackID)?token=\(token)")!
4
5 playerViewController.prepare(
6 playbackID: playbackID,
7 playbackOptions: PlaybackOptions(
8 playbackToken: token,
9 drmOptions: DRMOptions(
10 licenseURL: licenseURL,
11 certificateURL: certificateURL
12 )
13 )
14 )
15}

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.