Downloader
interface Downloader
Types
Name | Summary |
---|---|
Builder | [androidJvm] class Builder(context: Context) Create a downloader |
Properties
Name | Summary |
---|---|
downloadStatus | [androidJvm] abstract val downloadStatus: StateFlow<List<DownloadStatus>> Flow for download status, including {DownloadState} and progress in percentage |
errorEvent | [androidJvm] abstract val errorEvent: Flow<UniDownloadErrorEvent> Flow for error events of download processing |
Functions
Name | Summary |
---|---|
download | [androidJvm] abstract fun download(config: DownloadConfig) Start downloading for specified stream |
getLicenseRemainingSec | [androidJvm] abstract fun getLicenseRemainingSec(config: DownloadConfig): Long Get the DRM license remaining duration in seconds |
pause | [androidJvm] abstract fun pause(config: DownloadConfig) Pause downloading for specified stream |
release | [androidJvm] abstract fun release() Release the downloader. We recommend that you should call this method when you don't need the downloader anymore. |
remove | [androidJvm] abstract fun remove(config: DownloadConfig) Remove an item while downloaded or still in downloading |
removeAll | [androidJvm] abstract fun removeAll() Remove all items |
resume | [androidJvm] abstract fun resume(config: DownloadConfig) Resume downloading for specified stream |