OTVPersistenceAsset
@interface OTVPersistenceAsset : NSObject
Downloads are represented by the objects of the class OTVPersistenceAsset
.
They have a OTVDownloadState
to reflect their lifecycle.
-
Unique identifier for the asset
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull uuid;
-
Title of the asset
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull title;
-
URL of the asset
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull url;
-
Progress of the asset download
Declaration
Objective-C
@property (nonatomic, readonly) double percentComplete;
-
Returns the error details of the failure.
-
This field applies only if the
downloadError
is not.noError
, returnsnil
otherwise
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nullable error;
-
This field applies only if the
-
Returns the failure reason of the download.
-
This field applies only if the state is
error
, returnsnil
otherwise
Declaration
Objective-C
@property (nonatomic, readonly) enum OTVDownloadError downloadError;
-
This field applies only if the state is
-
The asset ID
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nullable identifier;
-
The total size downloaded for the downloaded/downloading asset in bytes
Declaration
Objective-C
@property (nonatomic, readonly) uint64_t totalSizeDownloaded;
-
The DRM type of the asset
Declaration
Objective-C
@property (nonatomic, readonly) enum OTVPersistenceDRMType drmMode;
-
The OTVMediaInfo for the asset
Declaration
Objective-C
@property (nonatomic, strong, readonly) OTVMediaInfo *_Nullable mediaInfo;
-
The OTVPersistLicenseInfo for the asset
Declaration
Objective-C
@property (nonatomic, strong, readonly) OTVPersistLicenseInfo *_Nullable licenseInfo;
-
Declaration
Objective-C
- (void)renewLicenseWithDelegate:(id <OTVLicenseDelegate> _Nonnull)delegate options:(NSDictionary<NSString *, id> * _Nullable)options;
-
Setup FPS license delegate. note:
-
The
OTVPersistenceAsset
object MUST be in state `prepared, otherwise calling this function has no effect.
-
Parameters:
urlAssetExtension: An object implements protocol
OTVAVURLAssetExtension
, e.g.OTVPRMAVURLAsset
Declaration
Objective-C
- (void)setupFPSWith:(id<OTVLicenseDelegate> _Nonnull)delegate;
-
The
-
Setup PRM for a download
OTVPRMAVURLAsset
. note:-
The
OTVPersistenceAsset
object MUST be in one state fromnotDownloaded
,prepared
orpreparing
, otherwise calling this function has no effect.
-
Parameters:
urlAssetExtension: An object implements protocol
OTVAVURLAssetExtension
Declaration
Objective-C
- (void)setupPRMFor:(id<OTVAVURLAssetExtension> _Nonnull)urlAssetExtension;
-
The