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
preparedstate: - You can check the mediaInfo values on the OTVPersistenceAsset
- You can query the
OTVPersistenceAsset.mediaInfo.availableStreamInfoto see all the information needed to start downloading the asset. - You can query the
OTVPersistenceAsset.mediaInfo.availableDrmInfoto 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
OTVPersistenceAssetNote
- You MUST call
prepareDownloadand wait for statePreparedon theOTVPersistenceAssetbefore calling this function- If the stream is FPS encrypted, you MUST call
setupFPS:on the preparedOTVPersistenceAssetbefore calling this function, and pass anOTVLicenseDelegateinstance; - If the stream is PRM encrypted, you MUST call
setupPRM:on the preparedOTVPersistenceAssetbefore call this function, and pass anOTVPRMAVURLAssetobject; - If the stream is clear one, you SHOULD NOT call
setupFPS:orsetupPRM:on the preparedOTVPersistenceAsset. - You can set a number of values on the
OTVPersistenceAssetto choose what resolution and bitrate you want to download - You can do this by setting
OTVPersistenceAsset.mediaInfo.selectedStreamInfofrom selection one of theOTVPersistenceAsset.mediaInfo.availableStreamInfo - If no value is set for
OTVPersistenceAsset.mediaInfo.selectedStreamInfowe will check theoptionsvalue passed into this function. - If neither of these values are set then we will use the highest possible value you are able to download.
- If the stream is FPS encrypted, you MUST call
- You MUST call
-
Start a media stream dowloading for a
OTVPersistenceAssetNote
- You MUST call
prepareDownloadand wait for statePreparedon theOTVPersistenceAssetbefore calling this function- If the stream is FPS encrypted, you MUST call
setupFPS:on the preparedOTVPersistenceAssetbefore calling this function, and pass anOTVLicenseDelegateinstance; - If the stream is PRM encrypted, you MUST call
setupPRM:on the preparedOTVPersistenceAssetbefore call this function, and pass anOTVPRMAVURLAssetobject; - If the stream is clear one, you SHOULD NOT call
setupFPS:orsetupPRM:on the preparedOTVPersistenceAsset. - You can set a number of values on the
OTVPersistenceAssetto choose what resolution and bitrate you want to download - You can do this by setting
OTVPersistenceAsset.mediaInfo.selectedStreamInfofrom selection one of theOTVPersistenceAsset.mediaInfo.availableStreamInfo - If no value is set for
OTVPersistenceAsset.mediaInfo.selectedStreamInfowe will check theoptionsvalue passed into this function. - If neither of these values are set then we will use the highest possible value you are able to download.
- If the stream is FPS encrypted, you MUST call
- You MUST call
-
Return downloading and downloaded assets.
-
Pause the downloading of assigned asset.
-
Resume the paused downloading asset.
-
Cancel or remove the asset.
-
Extends
See moreOTVPersistenceManagerto define a number of values to use as keys in dictionary options. -
-
-
OTVPersistenceManager Class Reference