OfflineContentManagerListener
Protocol for listeners for the OfflineContentManager
.
-
Is called when the download of the media content failed. Downloaded content may have been stored to disk. It is possible to retry the download by first checking the state of the source config using
OfflineContentManager.offlineState
and then taking one of the actions allowed in the current state as documented in OfflineContentManager.h -
Is called when the download of the media content was successful.
-
Is called when the download of the media content progressed to a new percentage value. The method is only called when the according
SourceConfig
is in stateOfflineStateDownloading
. -
Is called when the download of the media content was suspended. This could be the result of a call to
OfflineContentManager.suspendDownload()
or if the app was terminated by the user while downloads were running. In the latter case, this listener method is called upon first application startup after termination. -
Is called when the download of the media content was resumed after it was suspended.
-
Is called when the download of the media content was cancelled by the user and all partially downloaded content has been deleted from disk.
-
Is called when the offline license was successfully renewed and written to disk.
-
Is called on every call to
OfflineContentManager.createOfflineSourceConfig(restrictedToAssetCache:)
if it is DRM protected and the offline DRM license has expired. -
Is called when information on available tracks is available.
-
Is called when content migration triggered via
OfflineContentManager.tweaks.migrateDownload(remoteAssetUrl:resourceIdentifierCallback:)
has finished. -
Is called for each occurring offline event.