estimateSize

open fun estimateSize(video: Video): Long

This method returns the approximate total size for a Video already downloaded or with a download in progress. The estimate will include the size of the video, subtitles and other assets such as thumbnails. The actual size of the video on the host device may vary based on the partition type and format of the storage. If you attempt to get the estimated size for a Video that has not been downloaded, you will get a size of 0. Use the estimateSize for this scenario.

Return

the size of the video

Parameters

video

- reference to the video to be estimated.

See also


open fun estimateSize(video: Video, callback: MediaDownloadable.OnVideoSizeCallback)

This method is used to determine the approximate total size of all assets needed to store the video on the host device. The estimate will include the size of the video, subtitles and other assets such as thumbnails. The actual size of the video on the host device may vary based on the partition type and format of the storage. NOTE: This method requires the Media Manifest to retrieve the requested information, therefore it might download the manifest and store it to the directory provided by getDownloadPath, if it has not been done already. If this directory is invalid, it will throw a InvalidDownloadPathException.

Parameters

video

reference to the video to be estimated.

callback

to return the video size.

See also

Throws

when the current download path is invalid.