OTVPersistenceManager

OTVPersistenceManager is a singleton that manages all download related functionality. It utilises OTVDownloadingAssetManager for outstanding downloads and OTVAssetsManager for completed downloads.

  • Persistence Manager singleton instance.

  • Start a media stream dowloading.

    Note

    You MUST NOT share the same license delegate instance for multiple downloading.
  • Start Preparing a media stream ready for dowloading.

    Note

    • To begin the download you must wait for the prepared download state on the OTVPersistenceAsset returned here.
    • Once the OTVPersistenceAsset has entered prepared state:
    • You can check the mediaInfo values on the OTVPersistenceAsset
    • You can query the OTVPersistenceAsset.mediaInfo.availableStreamInfo to see all the information needed to start downloading the asset.
    • You can query the OTVPersistenceAsset.mediaInfo.availableDrmInfo to get the drm information of the asset.
    • You SHOULD retain the object returned from preparedDownload, and pass the object to call startDownload: persistenceAsset… when state is changed to Prepared
  • Start a media stream dowloading for a OTVPersistenceAsset

    Note

    • You MUST call prepareDownload and wait for state Prepared on the OTVPersistenceAsset before calling this function
      • If the stream is FPS encrypted, you MUST call setupFPS: on the prepared OTVPersistenceAsset before calling this function, and pass an OTVLicenseDelegate instance;
      • If the stream is PRM encrypted, you MUST call setupPRM: on the prepared OTVPersistenceAsset before call this function, and pass an OTVPRMAVURLAsset object;
      • If the stream is clear one, you SHOULD NOT call setupFPS: or setupPRM: on the prepared OTVPersistenceAsset.
      • You can set a number of values on the OTVPersistenceAsset to choose what resolution and bitrate you want to download
      • You can do this by setting OTVPersistenceAsset.mediaInfo.selectedStreamInfo from selection one of the OTVPersistenceAsset.mediaInfo.availableStreamInfo
      • If no value is set for OTVPersistenceAsset.mediaInfo.selectedStreamInfo we will check the options value passed into this function.
      • If neither of these values are set then we will use the highest possible value you are able to download.
  • Start a media stream dowloading for a OTVPersistenceAsset

    Note

    • You MUST call prepareDownload and wait for state Prepared on the OTVPersistenceAsset before calling this function
      • If the stream is FPS encrypted, you MUST call setupFPS: on the prepared OTVPersistenceAsset before calling this function, and pass an OTVLicenseDelegate instance;
      • If the stream is PRM encrypted, you MUST call setupPRM: on the prepared OTVPersistenceAsset before call this function, and pass an OTVPRMAVURLAsset object;
      • If the stream is clear one, you SHOULD NOT call setupFPS: or setupPRM: on the prepared OTVPersistenceAsset.
      • You can set a number of values on the OTVPersistenceAsset to choose what resolution and bitrate you want to download
      • You can do this by setting OTVPersistenceAsset.mediaInfo.selectedStreamInfo from selection one of the OTVPersistenceAsset.mediaInfo.availableStreamInfo
      • If no value is set for OTVPersistenceAsset.mediaInfo.selectedStreamInfo we will check the options value passed into this function.
      • If neither of these values are set then we will use the highest possible value you are able to download.
  • Return downloading and downloaded assets.

  • Pause the downloading of assigned asset.

  • Resume the paused downloading asset.

  • Cancel or remove the asset.

  • Extends OTVPersistenceManager to define a number of values to use as keys in dictionary options.

    See more