Studio DRM and AVPlayer provide a comprehensive approach to protecting your content with industry-standard Digital Rights Management (DRM). After enabling DRM on a property from your JWP dashboard and integrating with AVPlayer, DRM decryption of the content will be managed by AVPlayer and the OS.

For more information about the DRM workflow, refer to the <a href="https://docs.jwplayer.com/platform/docs/protection-studio-drm-overview#high-level-workflow-overview" target="_blank">High-Level Workflow Overview</a>.

<br />



For the following use cases, use [Studio DRM Standalone](🔗) with your current streaming and hosting solution:

  • Choosing not to enable Studio DRM with JW Platform

  • Implementing live stream integrations

<br />




## Requirements

<table> <thead> <tr> <th> Item </th> <th> Notes </th> </tr> </thead> <tbody> <tr> <td width="40%"> <strong>DRM entitlement</strong> </td> <td width="60%"> Contact your JWP representative for more information.</td> </tr> <tr> <td> <strong>DRM-enabled property</strong> </td> <td> See: <a href="/platform/docs/protection-studio-drm-get-started#enable-a-property" target="_blank">Enable a property</a></td> </tr> <tr> <td> <strong>FairPlay Streaming Deployment Package</strong> </td> <td> See: <a href="/platform/docs/protection-studio-drm-get-started#add-fairplay-credentials-to-a-property" target="_blank">Add FairPlay credentials to a property</a></td> </tr> </tbody> </table>

<br />




## Implementation



We **strongly recommend** referring to and starting with our <a href="https://sdks.vudrm.tech/ios/latest/studiodrm-ios-avplayer-del_api-offline-client-demo.zip" target="_blank">Studio DRM with JW Platform and AVPlayer demo</a> for iOS and tvOS. This .zip file allows you to see both Apple's recommended full working implementation and an example of how to manage the licensing of online and offline multiple assets.

<br />

Use the following steps to set up DRM playback in your iOS app:

  1. Create a `DeliveryAPI` struct to easily parse the required JSON data.

    

<br />

  1. Generate a [signed URL for DRM playback.](🔗)

    

    We **strongly recommend** using a proxy service to generate the JSON web token (JWT). If you generate the JWT within a client-side native app, you risk exposing your API secret.

<br />

  1. Make a `GET` call with the signed URL.<br /> From the signed content URL response, the example code sample extracts the content URL `(playlist[].sources[].file)`, the certificate URL `(playlist[].sources[].drm.fairplay.certificateUrl)` and the SPC Process URL `(playlist[].sources[].drm.fairplay.spcProcessUrl)` from the sources array and populates the specific stream configuration with them. <br /><br />

    

    The ordering of items within `playlist[].sources[]` is not static. Therefore, do not use a defined index `(playlist[].sources[0])` as part of your extraction process. The following example code sample demonstrates how to locate the correct `playlist[].sources` index.

    Also, both the media URL and its associated LAURLs are valid for only **10 minutes from when they are requested.**

<br /><br />




<br />

  1. Parse the `stream.contentKeyIDList` from the .m3u8 manifest. The `stream.contentKeyIDList` enables the OS to map the content and license correctly.

    

<br />

  1. Use the extracted license URL `stream.certificateURL` to retrieve the Application Certificate.<br /><br />In response to the various `ContentKeyDelegate` class calls required to complete the associated certification and licensing, the following code will obtain the Application Certificate and then the FairPlay License required for either online or offline playback.

    

<br />

  1. Use the extracted license URL `stream.licenseURL` to retrieve the FairPlay license.

    

<br />

<!-- Removes the automatic page-to-page navigation at the bottom of the page -->

<style> .rm-Pagination { display: none; } </style>