Apple FairPlay Streaming (FPS) DRM

FairPlay Streaming (FPS) supports:

Quick Start

Set up playback via Apple FairPlay Streaming (FPS) by performing the following steps:

  1. Register as a licensed content owner with Apple and request a deployment package.

    Request FPS deployment package from Apple.

  2. Request Studio DRM activation by submitting the following information via the Apple FairPlay Streaming page:

    • Your application public key certificate.
    • Your RSA private key passphrase.
    • Your application secret key.
    • Your RSA private key in PEM format.
  3. Verify that both the Require a token for playback and the Require a studio approved DRM for playback options have been enabled on the desired CMS asset, live channel, or live event.
  4. Make your application compatible with our service by performing the following steps: 

    1. Point your player to a HLS version of the playback URL that corresponds to the content identified in the previous step.

      Construct and digitally sign this playback URL.

      • Query String

        Append the following value to end of the playback URL:

        ?rmt=fps
      • Studio DRM Policies

        Define the desired set of Studio DRM policies by adding either a Studio DRM policy configuration or the desired individual policies to the playback URL's query string.

        ?rmt=fps&drm_policy_name=wvpolicy1

        Use a Studio DRM policy configuration and/or the parameter expansion capability to obfuscate your Studio DRM policies.

      • Digital Signature

        Sign the playback URL.

    2. Update the Key Server Module (KSM) URL's scheme to https://.
    3. Submit a Content Key request to our Key Server using the above KSM URL.
    4. Use the deserialized Content Key Context (CKC) message to initiate playback.

If you override the EXT-X-VERSION tag defined in the playback URL, do not set it to a lower value.

Activation

FPS encrypts content to prevent unauthorized playback. In order to playback encrypted content, a player must use a Content Key to decrypt it. This Content Key is generated by our key server. Before our key server may generate Content Keys for your account, it requires information provided by Apple as a part of your FPS deployment package.

Submit the following information via the Apple FairPlay Streaming page:

FPS Deployment Data Description

Application Public Key Certificate

Upload the application public key certificate provided by Apple. This X.509 certificate should be in Distinguished Encoding Rules (DER) format and have a .cer or .der file extension.

RSA Private Key Passphrase

Provide the passphrase that encrypted your private key during CSR submission.

Application Secret Key

Provide your application secret key which is a 32 character hex string.

RSA Private Key

Upload your private key by:

  1. Opening the .pem file in a text editor.
  2. Copying the entire contents of that file.
  3. Pasting it in the Private Key (.pem) option.
  4. Verify that this option looks similar to the following copy:

    -----BEGIN RSA PRIVATE KEY-----
    ...
    -----END RSA PRIVATE KEY-----

Content Keys

Upon initiating playback, an Apple device should request a Content Key from the Key Server Module (KSM) for the desired content. The KSM will provide the Content Key within an encrypted response.

Updating the KSM URL

Before requesting a Content Key, update the scheme defined within the EXT-X-KEY URL attribute from skd:// to https://. The following sample JavaScript function returns an updated KSM URL.

JavaScript KSM construction example:

function getSPCUrl(initData) {
     skdurl = arrayToString(initData);
     spcurl = skdurl.replace('skd://', 'https://');
     spcurl = spcurl.substring(1, spcurl.length);
     return spcurl;
}

Requesting a Content Key

Request a Content Key via the following request:

The body of the response will contain a Base64-encoded string for a Content Key Context (CKC) message.

Sample request:

{
	"spc": "your base 64 string"
}

Sample response:

{
	"ckc": "your base 64 string"
}

Content Key Request Minimization

Reduce rebuffering, improve startup time, and speed up switching between different raysA stream with a specific quality configuration based on set bit rate and resolution targets. Each ray is divided into slices. encrypted with the same content key by minimizing content key requests.

Reuse licenses for content, ads, and different rays by performing the following steps:

  1. Contact your account manager to request that your encoding profile be optimized for content key reuse.
  2. Include fpuseki=1 within the playback URL's query string.
  3. Update your player to cache licenses and associate them with license URLs.

    Add logic to your code to request a new license when a request with a cached license fails. This best practice is especially useful when you have defined a duration for content keys within your Studio DRM policy.

    By default, a license does not expire. However, if you define a duration for content keys within your Studio DRM policy, it should be set to a time period that is longer than the scheduled program. For example, you should set it to 5 hours for a 4 hour live event.

Additional Information

Consult Apple's FairPlay documentation for information on how to:

Playback without Studio DRM Protection

The following information is only applicable once Studio DRM has been activated on your account.

Certain types of content (e.g., slate) should not be protected by Studio DRM.

To play content without Studio DRM protection

  1. Disable Studio DRM by performing either of the following:

    • Clear the Require studio approved DRM for playback option on the desired CMS asset.
    • Pass the drm_optional parameter in the playback URL.

      Learn more.

  2. Update your player to request a cleartext key via the following URL:

    https://content.uplynk.com/ck
More Information