VdoDownloadManager

VdoDownloadManager handles enqueuing download requests and management of media downloads.

New download requests can be added which will remain in queue and downloaded serially.

Status of media downloads can be requested using filtered queries.

Download events can be listened to by registering a listener with the VdoDownloadManager instance. Make sure to unregister listener when not required to avoid memory leaks.

Types

Link copied to clipboard
interface EventListener
Callback interface for listening to download events.
Link copied to clipboard
class Query
Class used to specify filters for a query.
Link copied to clipboard
Callback interface for listening to query results.

Functions

Link copied to clipboard
Add a listener for download events.
Link copied to clipboard
open fun enqueue(@NonNull request: DownloadRequest)
Enqueue a request to be downloaded.
Link copied to clipboard
open fun enqueueV2(@NonNull downloadRequest: DownloadRequest)
Enqueue a request to be downloaded.
Link copied to clipboard
open fun getInstance(@NonNull context: Context, @Nullable downloadLocation: String): VdoDownloadManager
Get an instance of VdoDownloadManager.
Link copied to clipboard
Returns map of media id and last played time for given media ids.
Link copied to clipboard
Query the VdoDownloadManager about media saved for offline playback without drm license.
Link copied to clipboard
open fun pauseAllDownloads(mediaIds: Array<String>)
Link copied to clipboard
Query the VdoDownloadManager about media downloads that have been requested.
Link copied to clipboard
open fun remove(mediaIds: Array<String>)
Cancel media downloads and delete them locally.
Link copied to clipboard
Remove a listener of download events.
Link copied to clipboard
open fun resumeAllDownloads(mediaIds: Array<String>)
Link copied to clipboard
open fun resumeDownload(mediaId: String)
Link copied to clipboard
open fun resumeDownloads(mediaIds: Array<String>)
Resume download for given media ids.
Link copied to clipboard
open fun saveOffline(@NonNull downloadRequest: DownloadRequest)
Enqueue a request to be downloaded.
Link copied to clipboard
open fun setDownloadNotificationHelper(@Nullable downloadNotificationHelper: Class<out VdoDownloadNotificationHelper>)
Change download notification look and feel.
Link copied to clipboard
open fun stopDownload(mediaId: String)
Link copied to clipboard
open fun stopDownloads(mediaIds: Array<String>)
Stop download for given media ids.

Properties

Link copied to clipboard
Link copied to clipboard
val ERROR_DATABASE: Int = 1040
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val ERROR_DRM: Int = 1060
Link copied to clipboard
Link copied to clipboard
val ERROR_FILE_ERROR: Int = 1031
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val ERROR_LICENSE: Int = 1050
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val ERROR_UNKNOWN: Int = 1001
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard