public protocol DownloaderAPI
Downloader Interface.
public protocol DownloaderAPI
Downloader Interface.
Creates a downloader instance.
Swift
init(withCellularAccess access: Bool, andHeaders headers: [String : String])
access
|
Cellular access. |
headers
|
List of request headers. |
Creates a download for a given player configuration.
Player Configuration is verified in the prepare
method
Swift
func createDownload(_ config: PlayerConfiguration, headers: [String : String]) -> Download
config
|
Player configuration. |
headers
|
List of request headers. |
Prepare a single download metadata and track model. The model contains video qualities, audio tracks, and subtitle tracks and implementations need to select which of these tracks should be downloaded.
downloadId
|
Download identifier. |
completion
|
Called on completion. |
Starts a given download.
Swift
func startDownload(_ downloadId: String, delegate: DownloadDelegate?) -> CLError?
downloadId
|
Download identifier. |
delegate
|
Download delegate. |
The error that can occur when pausing the download of the given downloadId
.
Pause a download.
Swift
func pauseDownload(_ downloadId: String) -> CLError?
downloadId
|
Download identifier. |
The error that can occur when pausing the download of the given downloadId
.
Resume a download.
Swift
func resumeDownload(_ downloadId: String) -> CLError?
downloadId
|
Download identifier. |
The error that can occur when resuming the download of the given downloadId
.
Stops the download progress but keep the content and the reference in the history.
Swift
func cancelDownload(_ downloadId: String) -> CLError?
id
|
Download identifier. |
The error that can occur when cancelling the download of the given downloadId
.
Cancel the download and remove any content and reference from the history.
Swift
func removeDownload(_ downloadId: String) -> CLError?
id
|
Download identifier. |
The error that can occur when removing downloaded content
for the given downloadId
.
Get list of ongoing and completed downloads.
Swift
func getDownloads() -> [Download]
list of downloads