DownloadMetaData

data class DownloadMetaData(id: Int?, var bytesDownloaded: Long = 0, var bytesWritten: Long = 0, var totalBytes: Long? = null, lastUpdatedMs: Long = 0, lastDownloadedBytes: Long = 0, createNotificationCallback: (VideoDownloadManager.CreateNotificationMetadata) -> Unit, internalType: VideoDownloadManager.DownloadType = DownloadType.IsPending, var hlsProgress: Int = 0, var hlsTotal: Int? = null, var hlsWrittenProgress: Int = 0, downloadFileInfoTemplate: VideoDownloadManager.DownloadedFileInfo? = null) : Closeable

This class handles the notifications, as well as the relevant key

Constructors

Link copied to clipboard
constructor(id: Int?, bytesDownloaded: Long = 0, bytesWritten: Long = 0, totalBytes: Long? = null, lastUpdatedMs: Long = 0, lastDownloadedBytes: Long = 0, createNotificationCallback: (VideoDownloadManager.CreateNotificationMetadata) -> Unit, internalType: VideoDownloadManager.DownloadType = DownloadType.IsPending, hlsProgress: Int = 0, hlsTotal: Int? = null, hlsWrittenProgress: Int = 0, downloadFileInfoTemplate: VideoDownloadManager.DownloadedFileInfo? = null)

Types

Link copied to clipboard
object Companion

Properties

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

Functions

Link copied to clipboard
fun addBytes(length: Long)

adds the length and pushes a notification if necessary

Link copied to clipboard
fun addBytesWritten(length: Long)
Link copied to clipboard
fun addSegment(length: Long)

adds the length + hsl progress and pushes a notification if necessary

Link copied to clipboard
open override fun close()
Link copied to clipboard
fun onDelete()
Link copied to clipboard
Link copied to clipboard
fun setOnStop(callback: () -> Unit)

on cancel button pressed or failed invoke this once and only once

Link copied to clipboard
fun setResumeLength(length: Long)
Link copied to clipboard
fun setWrittenSegment(segmentIndex: Int)