Offline Playback

To test this feature and view the example code, please see the Apple (FPS) Example Code Quick Start guide.

This feature enables you to store content and licenses for future playback.

Offline, or persistent storage, is achieved using two classes. The OTVPersistenceManager object provides all the persistence operations required by the application. It maintains a list of OTVPersistenceAsset assets, either downloading or where the download has completed. The app can monitor the status of the various downloaded/downloading assets by setting up listeners (observers) for download progress events and changes in the download state.

Offline playback is enabled out in the following stages:

  • Offline playback of clear content
  • Offline playback of FPS encrypted content


Clear content

  • The application is configured to play clear content.
  • A clear stream with download enabled is available for testing.

FPS encrypted content

  • The application is configured to play FPS encrypted content.
  • An encrypted stream with a download-enabled license is available for testing. This can either be one for which you have the content identifier already or one that has the content id embedded within the EXT-X-KEY or EXT-X-SESSION-KEY tag of the HLS playlists.


  • iOS version 11.2 and later is supported.
  • Downloads that are in progress when:
    • Running with Xcode (when Xcode terminates the process).
    • Termination via the App Switcher (e.g., on devices with a home button, a double-home-press and slide up).
    • Termination while the app is suspended and the device reboots.
  • License expiration handling is not yet supported.


The full procedure comprises the following steps:

  • Initial persistency set-up
    The application accesses the OTVPersistenceManager and sets up the listeners.
  • Retrieving the licence (FPS encrypted content only)
    The application may have to request the license ahead of the download being triggered.
  • Start the download
    The application triggers the effective download and persistency of the media data.
  • Play the download
    The application can play back the downloaded asset in a similar manner to streamed content.
  • Purge the download
    The application purges the asset and licence (if applicable) when the user no longer needs it.