MediaDownloadable
An abstract class that holds information related to a remote media (Video) to be downloaded and responsible to manage the download of its components such as video, audio and text.
Author
Sergio Martinez - smartinez@brightcove.com
Inheritors
Constructors
Link copied to clipboard
constructor(context: Context, video: Video, downloadEventListener: MediaDownloadable.DownloadEventListener, requestConfig: RequestConfig)
Types
Link copied to clipboard
interface DownloadEventListener
Interface definition for a callback to be invoked when a media download is either completed, cancelled or failed because an error has occurred.
Link copied to clipboard
interface MediaFormatListener
Interface definition for a callback to be invoked when the video tracks have been read and are available.
Link copied to clipboard
interface OnVideoSizeCallback
Properties
Link copied to clipboard
The key for the Bundle which returns the available audio language roles as ArrayList, matching the size and indexes of .
Link copied to clipboard
The key for the Bundle which returns the available audio languages as ArrayList
Link copied to clipboard
The name of that will be used for saving DASH manifest.
Link copied to clipboard
The key for the Bundle which returns the available video renditions as ArrayList
Functions
Link copied to clipboard
Cancels download of the media if it has not been completed yet.
Link copied to clipboard
open fun create(context: Context, video: Video, downloadEventListener: MediaDownloadable.DownloadEventListener, requestConfig: RequestConfig): MediaDownloadable
Creates the best MediaDownloadable for the given video based on the supported delivery types.
open fun create(context: Context, videoUrl: String, downloadEventListener: MediaDownloadable.DownloadEventListener, requestConfig: RequestConfig): MediaDownloadable
Creates the best MediaDownloadable for the given video url on the supported delivery types.
Link copied to clipboard
Deletes the offline copy of the media.
Link copied to clipboard
Returns the estimated total size of the media, which includes all assets such video, audio and subtitles.
Link copied to clipboard
Link copied to clipboard
Gets the directory the will hold all the assets related to this media.
Link copied to clipboard
Checks the overall download status by inspecting the status of each request in the entire download set.
Link copied to clipboard
Returns the estimated total size of the media, which includes all assets such video, audio and subtitles.
Link copied to clipboard
abstract fun getMediaFormatTracksAvailable(mediaFormatListener: MediaDownloadable.MediaFormatListener)
An asynchronous call to retrieve the MediaFormat tracks available for the current video.
Link copied to clipboard
Attempts to pause download of this media.
Link copied to clipboard
open fun registerDownloadable(deliveryType: DeliveryType, downloadableClass: Class<out MediaDownloadable>)
Registers the downloadable class that must be used to handled download of the specified media delivery type.
Link copied to clipboard
Requests the media to be downloaded asynchronously.
Link copied to clipboard
Attempts to resume download of this media.
Link copied to clipboard
Link copied to clipboard
Sets the video bitrate cap which will be used to determine what rendition will be downloaded.