VdoDownloadManager class
VdoDownloadManager handles enqueuing download requests and management of media downloads.
New download requests can be added which will remain in queue until the requirements for downloads to progress are met.
Status of media downloads can be requested using filtered queries.
Download events can be listened to by registering a listener with the addDownloadEventListener. Make sure to unregister listener when not required to avoid memory leaks using removeDownloadEventListener.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addDownloadEventListener(
EventListener eventListener) → void - Add a listener for download events.
-
enqueue(
DownloadRequest downloadRequest) → void - Enqueue a request to be downloaded
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
query(
Query query) → Future< List< DownloadStatus> > - Query the VdoDownloadManager about media downloads that have been requested. Returns future of DownloadStatus list.
-
remove(
String mediaId) → void - Cancel media download and delete them locally
-
removeDownloadEventListener(
EventListener eventListener) → void - Remove a listener of download events.
-
resumeDownload(
String mediaId) → void - Resume download for given media id
-
stopDownload(
String mediaId) → void - Stop download for given media id
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getInstance(
) → dynamic - Get an instance of VdoDownloadManager
Constants
- STATUS_COMPLETED → const int
- STATUS_DOWNLOADING → const int
- STATUS_FAILED → const int
- STATUS_NOT_FOUND → const int
- STATUS_PAUSED → const int
- STATUS_PENDING → const int
- STATUS_REMOVING → const int
- STATUS_RESTARTING → const int