Downloader

interface Downloader

Types

Link copied to clipboard
class Builder(context: Context)

Create a downloader

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val downloadStatus: SharedFlow<List<DownloadStatus>>

Flow for download status, including {DownloadState} and progress in percentage

Link copied to clipboard
abstract val errorEvent: Flow<UniDownloadErrorEvent>

Flow for error Events of download processing

Link copied to clipboard
abstract var identifier: String

Use to determine the current user, the display data and archive location will be changed in the runtime

Functions

Link copied to clipboard
abstract fun download(config: DownloadConfig)

Start downloading for specified stream

Link copied to clipboard
abstract fun getLicenseRemainingSec(config: DownloadConfig): Long

Get the DRM license remaining duration in seconds

Link copied to clipboard
abstract fun pause(config: DownloadConfig)

Pause downloading for specified stream

Link copied to clipboard
abstract fun release()

Release the downloader. We recommend that you should call this method when you don't need the downloader anymore.

Link copied to clipboard
abstract fun remove(config: DownloadConfig)

Remove an item while downloaded or still in downloading

Link copied to clipboard
abstract fun removeAll()

Remove all items

Link copied to clipboard
abstract fun renewDrmLicense(config: DownloadConfig)

Renew the DRM license

Link copied to clipboard
abstract fun resume(config: DownloadConfig)

Resume downloading for specified stream

Link copied to clipboard
abstract fun syncLicenseStatus()

Synchronize the DRM license status