Configure offline DRM (iOS)

Allow users to download and view DRM content without connection to the Internet.



⚠️

Offline DRM playback is only supported by JWPlayerKit.


By requiring authorization from a key manager, DRM protects content from unauthorized consumption. However, there are situations when your viewers are offline and cannot immediately request this authorization.

Without instantiating a player, JWPlayerKit uses the JWDRMContentLoader to enable downloading your DRM-protected content and the required authorization. Later, a viewer can play the protected content offline.


πŸ“˜

Flow Explanation

  1. The JWDRMContentLoader is initialized with a JWDRMDataSource and JWDRMContentKeyManager. The JWDRMDataSource supplies the content keys. The JWDRMContentKeyManager stores the content keys.
  2. After the JWDRMContentLoader has been initialized, you can pass either a playlist comprised of an array of JWPlayerItems or a playlist URL generated through your JWP dashboard.
  3. User initiates playback.
  4. Informed of the acquisition of content keys, the JWDRMContentKeyManager permits protected content playback or deletes downloaded content from the device.

    The JWDRMContentKeyManager must be implemented outside of the iOS SDK. JWP makes available a default, customizable JWDRMContentKeyManager in the Best Practice Apps repository.


  1. When the user initiates playback, authorized protected content plays.


Implementation

Use the following recipe to configure offline DRM playback.