com.ooyala.android.offline.Downloader Interface Reference

A downloader of DASH and HLS media files. More...

Inheritance diagram for com.ooyala.android.offline.Downloader:
com.ooyala.android.offline.OoyalaDownloader

Public Member Functions

void startDownload ()
 This is to start/resume the download process. More...
 
void cancel ()
 Abort the download. More...
 
void delete (int taskId)
 Completely remove a folder and its contents for an offline video. More...
 
void requestBitrates ()
 Request the represented bitrate list in the manifest. More...
 
float getDownloadPercentage (int taskId)
 
long getLicenseExpirationDate ()
 Get the license expiration data from the license file. More...
 
void addListener (DownloadListener downloadListener)
 Register a listener to receive events from the downloader. More...
 
void removeListener ()
 Unregister a listener. More...
 
void setOptions (OoyalaDownloadOptions options)
 Set the Ooyala downloader options. More...
 

Detailed Description

A downloader of DASH and HLS media files.

Member Function Documentation

void com.ooyala.android.offline.Downloader.addListener ( DownloadListener  downloadListener)

Register a listener to receive events from the downloader.

Parameters
downloadListenerThe listener to register.

Implemented in com.ooyala.android.offline.OoyalaDownloader.

void com.ooyala.android.offline.Downloader.cancel ( )

Abort the download.

Ooyala will cancel all the pending download tasks. If all segments are downloaded this will be ignored.

Implemented in com.ooyala.android.offline.OoyalaDownloader.

void com.ooyala.android.offline.Downloader.delete ( int  taskId)

Completely remove a folder and its contents for an offline video.

This is to remove the folder before reuse the same folder name.

Parameters
taskIdThe unique task id.

Implemented in com.ooyala.android.offline.OoyalaDownloader.

float com.ooyala.android.offline.Downloader.getDownloadPercentage ( int  taskId)
Parameters
taskIdThe unique task id.
Returns
The estimated download percentage, or C#PERCENTAGE_UNSET if no estimate is available or if this is a removal task.

Implemented in com.ooyala.android.offline.OoyalaDownloader.

long com.ooyala.android.offline.Downloader.getLicenseExpirationDate ( )

Get the license expiration data from the license file.

This should be called after video files are downloaded in the folder specified.

Returns
the license expiration date, in seconds from epoch. 0 if license file does not exist.

Implemented in com.ooyala.android.offline.OoyalaDownloader.

void com.ooyala.android.offline.Downloader.removeListener ( )

Unregister a listener.

The listener will no longer receive events from the downloader.

Implemented in com.ooyala.android.offline.OoyalaDownloader.

void com.ooyala.android.offline.Downloader.requestBitrates ( )

Request the represented bitrate list in the manifest.

The result will be returned DownloadListener#onBitratesObtained callback.

Implemented in com.ooyala.android.offline.OoyalaDownloader.

void com.ooyala.android.offline.Downloader.setOptions ( OoyalaDownloadOptions  options)

Set the Ooyala downloader options.

It will override the options that have been set in the constructor.

Implemented in com.ooyala.android.offline.OoyalaDownloader.

void com.ooyala.android.offline.Downloader.startDownload ( )

This is to start/resume the download process.

All the segments already downloaded will be skipped.

Implemented in com.ooyala.android.offline.OoyalaDownloader.