com.ooyala.android.offline.options.OoyalaDownloadOptions.Builder Class Reference

A Builder class. More...

Inheritance diagram for com.ooyala.android.offline.options.OoyalaDownloadOptions.Builder:
com.ooyala.android.offline.options.DownloadOptions.Builder

Public Member Functions

 Builder (String pcode, String embedCode, String domain, File folder)
 Create a builder. More...
 
Builder setDownloadActionFile (String downloadActionFile)
 
Builder setDownloadTrackerActionFile (String downloadTrackerActionFile)
 
Builder setMaxSimultaneousDownloads (int maxSimultaneousDownloads)
 
Builder setEmbedTokenGenerator (EmbedTokenGenerator generator)
 Set the secure URL generator, used if OPT is enabled for the stream. More...
 
Builder setConnectionTimeout (int timeout)
 Set connection timeout, in milliseconds, default value is 10 seconds. More...
 
Builder setReadTimeout (int timeout)
 Set read timeout, in milliseconds, default value is 10 seconds. More...
 
Builder setBitrate (int bitrate)
 Set the desired video bitrate to be downloaded, optional if the desired bitrate video stream does not exist, the stream that has the closest bitrate is chosen. More...
 
OoyalaDownloadOptions build ()
 Build the option. More...
 

Protected Attributes

String pcode
 
String embedCode
 
String domain
 
File folder
 
EmbedTokenGenerator tokenGenerator
 
int connectionTimeoutInMillisecond
 
int readTimeoutInMillisecond
 
int bitrate
 

Detailed Description

A Builder class.

Constructor & Destructor Documentation

com.ooyala.android.offline.options.OoyalaDownloadOptions.Builder.Builder ( String  pcode,
String  embedCode,
String  domain,
File  folder 
)

Create a builder.

Parameters
pcode- the pcode
embedCode- the embed code
domain- the domain
folder- the folder for offline streams to store

Member Function Documentation

OoyalaDownloadOptions com.ooyala.android.offline.options.OoyalaDownloadOptions.Builder.build ( )

Build the option.

Returns
the download option object
Builder com.ooyala.android.offline.options.OoyalaDownloadOptions.Builder.setBitrate ( int  bitrate)

Set the desired video bitrate to be downloaded, optional if the desired bitrate video stream does not exist, the stream that has the closest bitrate is chosen.

Parameters
bitratethe desired video bitrate in bits per second (bps), default is the highest bitrate
Returns
the builder
Builder com.ooyala.android.offline.options.OoyalaDownloadOptions.Builder.setConnectionTimeout ( int  timeout)

Set connection timeout, in milliseconds, default value is 10 seconds.

Parameters
timeout
Returns
the builder
Builder com.ooyala.android.offline.options.OoyalaDownloadOptions.Builder.setDownloadActionFile ( String  downloadActionFile)
Parameters
downloadActionFileThe name of the download action file. It is the file where DownloadActions are saved. So when the app restarts these actions can be continued. DON’T give a path in the folder you used for Cache to store downloaded content. SimpleCache deletes any file it doesn’t know.
Returns
the builder
Builder com.ooyala.android.offline.options.OoyalaDownloadOptions.Builder.setDownloadTrackerActionFile ( String  downloadTrackerActionFile)
Parameters
downloadTrackerActionFileThe name of the download tracker action file
Returns
the builder
Builder com.ooyala.android.offline.options.OoyalaDownloadOptions.Builder.setEmbedTokenGenerator ( EmbedTokenGenerator  generator)

Set the secure URL generator, used if OPT is enabled for the stream.

Parameters
generatorthe embed token generator
Returns
the builder
Builder com.ooyala.android.offline.options.OoyalaDownloadOptions.Builder.setMaxSimultaneousDownloads ( int  maxSimultaneousDownloads)
Parameters
maxSimultaneousDownloadsThe maximum number of simultaneous download tasks
Returns
the builder
Builder com.ooyala.android.offline.options.OoyalaDownloadOptions.Builder.setReadTimeout ( int  timeout)

Set read timeout, in milliseconds, default value is 10 seconds.

Parameters
timeout
Returns
the builder

Member Data Documentation

int com.ooyala.android.offline.options.DownloadOptions.Builder.bitrate
protectedinherited
int com.ooyala.android.offline.options.DownloadOptions.Builder.connectionTimeoutInMillisecond
protectedinherited
String com.ooyala.android.offline.options.DownloadOptions.Builder.domain
protectedinherited
String com.ooyala.android.offline.options.DownloadOptions.Builder.embedCode
protectedinherited
File com.ooyala.android.offline.options.DownloadOptions.Builder.folder
protectedinherited
String com.ooyala.android.offline.options.DownloadOptions.Builder.pcode
protectedinherited
int com.ooyala.android.offline.options.DownloadOptions.Builder.readTimeoutInMillisecond
protectedinherited
EmbedTokenGenerator com.ooyala.android.offline.options.DownloadOptions.Builder.tokenGenerator
protectedinherited