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

A Builder class. More...

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

Public Member Functions

 Builder (String pcode, String embedCode, String domain, File folder)
 Create a builder. More...
 
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...
 
DownloadOptions 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.DownloadOptions.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

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

Build the option.

Returns
the download option object
Builder com.ooyala.android.offline.options.DownloadOptions.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.DownloadOptions.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.DownloadOptions.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.DownloadOptions.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
protected
int com.ooyala.android.offline.options.DownloadOptions.Builder.connectionTimeoutInMillisecond
protected
String com.ooyala.android.offline.options.DownloadOptions.Builder.domain
protected
String com.ooyala.android.offline.options.DownloadOptions.Builder.embedCode
protected
File com.ooyala.android.offline.options.DownloadOptions.Builder.folder
protected
String com.ooyala.android.offline.options.DownloadOptions.Builder.pcode
protected
int com.ooyala.android.offline.options.DownloadOptions.Builder.readTimeoutInMillisecond
protected
EmbedTokenGenerator com.ooyala.android.offline.options.DownloadOptions.Builder.tokenGenerator
protected