DownloadTask

Represents a download task.

  • Unique id to identify the task. Mostly content Id.

  • Download states. This property can be observed for changes. The default state is suspended. The consumer is expected to invoke resume() on task creation to initiate the task.

  • Download progress. This property can be observed for changes.

  • The associated asset which can be used for playback. Note this asset will be available only on download completion.

  • Metadata associated with the download task.

  • The expiration date for the downloaded content. Default value is Date.distantFuture meaning no expiry. On going tasks would have default expiration value.

  • Size of download on disk in bytes

  • Lists the tracks selected for download, including either client-requested tracks or default tracks.

  • Lists the tracks selected for download, including either client-requested tracks or default tracks.

  • skd

    The identifier used for DRM license updates.

  • Playback-related information associated with the download task.

  • API to resume task. Only a suspended task could be resumed.

  • API to pause a task. Only a running task could be paused.

  • API to cancel a task. Only a running or suspened task could be cancelled.