-
public class Mp4Downloadable extends MediaDownloadable
A MediaDownloadable responsible to manage the download of a MP4 Video and its assets.
-
-
Constructor Summary
Constructors Constructor Description Mp4Downloadable(Context context, Video video, MediaDownloadable.DownloadEventListener downloadEventListener, RequestConfig requestConfig)
-
Method Summary
Modifier and Type Method Description void
getMediaFormatTracksAvailable(@NonNull() MediaDownloadable.MediaFormatListener mediaFormatListener)
An asynchronous call to retrieve the MediaFormat tracks available for the current video. boolean
requestDownload()
Requests the media to be downloaded asynchronously. void
estimatedSize(MediaDownloadable.OnVideoSizeCallback callback)
Returns the estimated total size of the media, which includes all assets such video, audioand subtitles. -
Methods inherited from class com.brightcove.player.offline.MediaDownloadable
cancelDownload, create, create, deleteDownload, estimatedSize, getConfigurationBundle, getDownloadDirectory, getDownloadStatus, getEstimatedSize, getMediaFormatTracksAvailable, pauseDownload, registerDownloadable, resumeDownload, setConfigurationBundle, setVideoBitrate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
Mp4Downloadable
Mp4Downloadable(Context context, Video video, MediaDownloadable.DownloadEventListener downloadEventListener, RequestConfig requestConfig)
-
-
Method Detail
-
getMediaFormatTracksAvailable
void getMediaFormatTracksAvailable(@NonNull() MediaDownloadable.MediaFormatListener mediaFormatListener)
An asynchronous call to retrieve the MediaFormat tracks available for the current video.The result will be given through the com.brightcove.player.offline.MediaDownloadable.MediaFormatListener listener.
Note: Only the video type DASH is currently supported.
- Parameters:
mediaFormatListener
- the media format listener
-
requestDownload
boolean requestDownload()
Requests the media to be downloaded asynchronously. The actual status of the download requestwill be published to the downloadEventListener. Please use getDownloadStatus to query the download status.
-
estimatedSize
void estimatedSize(MediaDownloadable.OnVideoSizeCallback callback)
Returns the estimated total size of the media, which includes all assets such video, audioand subtitles.
The actual size of the media that will be used by the host device may vary based on thepartition type and format of the storage.This method requires the Media Manifest to estimate the size, thereforeit might download the manifest and store it to the directory provided in the ( object in the constructor, if it has not been done already.
- Parameters:
callback
- the approximate size of the media.
-
-
-
-