Content Protection (DRM) Configuration
A DRM (Digital Rights Management) license URL is a URL that points to a server that issues licenses for protected digital content. When content is protected by DRM, it is encrypted to prevent unauthorized access and distribution. In order to view or use the content, the user needs a license that grants them permission to do so. The license contains information such as the user's rights to the content, the expiration date of the license, and the decryption key needed to access the content.
FairPlay
For FairPlay, the license URL and FairPlay certificate data properties must be specified. You can provide the FairPlay certificate data in two ways:
Attribute | Type | Description |
---|---|---|
data | string | FairPlay certificate data. |
url | string | URL to download the FairPlay certificate data by GET request. |
Swift
// Create media
let media = LuraMedia(url: "ENCRYPTED_MEDIA_URL",
type: "application/x-mpegURL",
licenseUrl: "LICENSE_URL")
// Create content
let luraContent = LuraContent(media: [media],
clientCertificates: nil,
title: "MEDIA_TITLE")
luraContent.clientCertificates.fairplay.data = "YOUR_FAIRPLAY_CERTIFICATE_DATA"
// Create config
let luraConfig = LuraPlayerConfiguration(name: "Configuration Name",
controls: nil,
content: luraContent)