OTVPersistenceAsset
public class 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
Swift
@objc public private(set) var uuid: String { get } -
Title of the asset
Declaration
Swift
@objc public internal(set) var title: String { get } -
URL of the asset
Declaration
Swift
@objc public internal(set) var url: String { get } -
Progress of the asset download
Declaration
Swift
@objc public internal(set) var percentComplete: Double { get } -
Returns the error details of the failure.
- This field applies only if the
downloadErroris not.noError, returnsnilotherwise
Declaration
Swift
@objc public internal(set) var error: String? { get } - This field applies only if the
-
Returns the failure reason of the download.
- This field applies only if the state is
error, returnsnilotherwise
Declaration
Swift
@objc public internal(set) var downloadError: OTVDownloadError { get set } - This field applies only if the state is
-
Current state of the asset
Declaration
Swift
public internal(set) var state: OTVDownloadState { get } -
The asset ID
Declaration
Swift
@objc public internal(set) var identifier: String? { get set } -
The total size downloaded for the downloaded/downloading asset in bytes
Declaration
Swift
@objc public var totalSizeDownloaded: UInt64 { get } -
The DRM type of the asset
Declaration
Swift
@objc public internal(set) var drmMode: OTVPersistenceDRMType { get } -
The OTVMediaInfo for the asset
Declaration
Swift
@objc public internal(set) var mediaInfo: OTVMediaInfo? { get } -
The OTVPersistLicenseInfo for the asset
Declaration
Swift
@objc public internal(set) var licenseInfo: OTVPersistLicenseInfo? { get } -
Declaration
Swift
@objc public func renewLicense(delegate: OTVLicenseDelegate, options: [String : Any]? = nil) -
Setup FPS license delegate.
Note
- The
OTVPersistenceAssetobject MUST be in state `prepared, otherwise calling this function has no effect.
Declaration
Swift
@objc public func setupFPS(with delegate: OTVLicenseDelegate) - The
-
Setup PRM for a download
OTVPRMAVURLAsset.Note
- The
OTVPersistenceAssetobject MUST be in one state fromnotDownloaded,preparedorpreparing, otherwise calling this function has no effect.
Declaration
Swift
@objc public func setupPRM(for urlAssetExtension: OTVAVURLAssetExtension) - The
-
Current state of the asset
Declaration
Swift
@objc(state) public var downloadState: OTVPersistenceAssetState { get } -
The local URL to access the offline asset from
Declaration
Swift
public func offlineURL() -> URL? -
Extends
See moreOTVPersistenceAssetto define a number of values to use as keys in dictionary lookups.Declaration
Swift
public struct Keys