Skip to navigation

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:

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.