AmpDownload
@objc
public class AmpDownload : NSObject, Codable, AVAssetDownloadDelegate
Container object with the information of an asset download.
-
Creates a new instance of the AmpDownloader.
Declaration
Swift
public init(title: String, url: String, assetArtworkData: Data? = nil)
Parameters
title
The asset title.
url
The playlist url of the asset.
assetArtworkData
The asset artwork.
-
The ID of the asset download.
Declaration
Swift
public var id: String { get }
-
The title of the asset.
Declaration
Swift
public var title: String { get }
-
Flag that indicates if the asset download is completed.
Declaration
Swift
public var isCompleted: Bool { get }
-
Flag that indicates if the asset download is paused.
Declaration
Swift
public var isPaused: Bool { get }
-
Flag that indicates if the asset download is canceled.
Declaration
Swift
public var isCanceled: Bool { get }
-
The playlist url of the asset.
Declaration
Swift
public var originUrl: String { get }
-
The location of the asset download.
Declaration
Swift
public var assetLocation: URL? { get }
-
The AVURLAsset object of the asset download.
Declaration
Swift
public var asset: AVURLAsset? { get }
-
Represents the progress of the asset download.
Declaration
Swift
public var progress: Float? { get }
-
Deletes an asset download.
Declaration
Swift
public func deleteVideo()
-
Flag that indicates if the asset download is DRM content.
Declaration
Swift
public var isProtected: Bool { get set }
-
Loads the keys to make protected content available for processing.
Declaration
Swift
public func loadFairplayKeys()
-
Updates the persistent key of a downloaded asset.
The responses of this function will be handle in
updatePersistableContentKeyCompleted(asset: AmpDownload)
anddownloadFailed(asset: AmpDownload?, error: Error, message: String)
functions inAmpDownloaderDelegate
.Declaration
Swift
public func updatePersistableContentKey(fairplayConfiguration: FairplayConfiguration)
Parameters
fairplayConfiguration
The FairplayConfiguration instance of the download.