Ooyala managed ads plugin manages ooyala and vast ads. More...

Inheritance diagram for com.ooyala.android.OoyalaManagedAdsPlugin:
com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot > com.ooyala.android.plugin.AdPluginInterface com.ooyala.android.StateNotifierListener com.ooyala.android.plugin.AdPluginInterface com.ooyala.android.plugin.LifeCycleInterface com.ooyala.android.AdsLearnMoreInterface com.ooyala.android.plugin.LifeCycleInterface com.ooyala.android.AdsLearnMoreInterface

Public Member Functions

 OoyalaManagedAdsPlugin (OoyalaPlayer player)
 Ooyala Managed Ads Plugin manages VAST and Ooyala ads. More...
 
void reset ()
 called when plugin should be reset More...
 
void suspend ()
 called when plugin should be suspended More...
 
void suspend (boolean onlyRemoveView)
 This is called when plugin should be suspended. More...
 
void resume ()
 called when plugin should be resumed More...
 
void resume (int timeInMilliSecond, State stateToResume)
 called when plugin should be resumed More...
 
void destroy ()
 called when plugin should be destroyed More...
 
void configurationChanged (Configuration newConfig)
 This method is called when the device configuration changes while your component is running. More...
 
boolean onContentChanged ()
 called when content is changed More...
 
void insertAd (OoyalaManagedAdSpot adSpot)
 Insert an Ooyala Managed Ad into the plugin's list of ads. More...
 
void onStateChange (StateNotifier notifier)
 event observer More...
 
void setSeekable (boolean s)
 
void skipAd ()
 This is called to skip the current ad. More...
 
PlayerInterface getPlayerInterface ()
 get the ad player, used to update UI controls More...
 
void processClickThrough ()
 This is called to process click through. More...
 
void onAdIconClicked (int index)
 This is called when an icon is clicked. More...
 
boolean allADSPlayed ()
 
boolean onInitialPlay ()
 called before content play starts More...
 
boolean onPlayheadUpdate (int playhead)
 called during content play More...
 
boolean onContentFinished ()
 called after content finish More...
 
boolean onCuePoint (int cuePointIndex)
 called on cue points More...
 
boolean onContentError (int errorCode)
 called when content playback error happens More...
 
void onAdModeEntered ()
 called on content More...
 
void resetAds ()
 This is called to reset all ads to unplayed. More...
 
Set< Integer > getCuePointsInMilliSeconds ()
 This returns the cue points. More...
 

Protected Member Functions

boolean playAd (OoyalaManagedAdSpot ad)
 
void processNonLinearAd (OoyalaManagedAdSpot ad)
 
boolean playAdsBeforeTime ()
 
abstract boolean playAd (T ad)
 play the ad after content is paused More...
 
abstract void processNonLinearAd (T ad)
 process an ad while content is still playing e.g. More...
 
int getLastAdModeTime ()
 called after content finish More...
 

Protected Attributes

OoyalaPlayer _player
 
AdSpotManager< T > _adSpotManager
 

Static Protected Attributes

static final int PLUGIN_INIT = -2
 
static final int CONTENT_CHANGED = -1
 

Detailed Description

Ooyala managed ads plugin manages ooyala and vast ads.

Constructor & Destructor Documentation

com.ooyala.android.OoyalaManagedAdsPlugin.OoyalaManagedAdsPlugin ( OoyalaPlayer  player)

Ooyala Managed Ads Plugin manages VAST and Ooyala ads.

Member Function Documentation

boolean com.ooyala.android.OoyalaManagedAdsPlugin.allADSPlayed ( )
Returns
true if all ads were played

Implements com.ooyala.android.plugin.AdPluginInterface.

void com.ooyala.android.OoyalaManagedAdsPlugin.configurationChanged ( Configuration  newConfig)

This method is called when the device configuration changes while your component is running.

Parameters
newConfigThe new device configuration.

Implements com.ooyala.android.plugin.LifeCycleInterface.

void com.ooyala.android.OoyalaManagedAdsPlugin.destroy ( )

called when plugin should be destroyed

Implements com.ooyala.android.plugin.LifeCycleInterface.

Set<Integer> com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >.getCuePointsInMilliSeconds ( )
inherited

This returns the cue points.

Implements com.ooyala.android.plugin.AdPluginInterface.

int com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >.getLastAdModeTime ( )
protectedinherited

called after content finish

Returns
CONTENT_CHANGED after onContentChanged, non-negative value after content play starts
PlayerInterface com.ooyala.android.OoyalaManagedAdsPlugin.getPlayerInterface ( )

get the ad player, used to update UI controls

Returns
the ad player

Implements com.ooyala.android.plugin.AdPluginInterface.

void com.ooyala.android.OoyalaManagedAdsPlugin.insertAd ( OoyalaManagedAdSpot  adSpot)

Insert an Ooyala Managed Ad into the plugin's list of ads.

Parameters
adSpoteither an OoyalaAdSpot or VASTAdSpot
void com.ooyala.android.OoyalaManagedAdsPlugin.onAdIconClicked ( int  index)

This is called when an icon is clicked.

Parameters
indexthe icon index

Implements com.ooyala.android.plugin.AdPluginInterface.

void com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >.onAdModeEntered ( )
inherited

called on content

Implements com.ooyala.android.plugin.AdPluginInterface.

boolean com.ooyala.android.OoyalaManagedAdsPlugin.onContentChanged ( )

called when content is changed

Implements com.ooyala.android.plugin.AdPluginInterface.

boolean com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >.onContentError ( int  errorCode)
inherited

called when content playback error happens

Returns
true if plugin needs to handle error, false otherwise

Implements com.ooyala.android.plugin.AdPluginInterface.

boolean com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >.onContentFinished ( )
inherited

called after content finish

Returns
true if plugin needs to play postroll ads, false otherwise

Implements com.ooyala.android.plugin.AdPluginInterface.

boolean com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >.onCuePoint ( int  cuePointIndex)
inherited

called on cue points

Returns
true if plugin needs to play midroll ads, false otherwise

Implements com.ooyala.android.plugin.AdPluginInterface.

boolean com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >.onInitialPlay ( )
inherited

called before content play starts

Returns
true if plugin needs to play preroll ads, false otherwise

Implements com.ooyala.android.plugin.AdPluginInterface.

boolean com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >.onPlayheadUpdate ( int  playhead)
inherited

called during content play

Parameters
playheadthe current content playhead
Returns
true if plugin needs to play midroll ads, false otherwise

Implements com.ooyala.android.plugin.AdPluginInterface.

void com.ooyala.android.OoyalaManagedAdsPlugin.onStateChange ( StateNotifier  notifier)

event observer

Implements com.ooyala.android.StateNotifierListener.

abstract boolean com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >.playAd ( ad)
abstractprotectedinherited

play the ad after content is paused

Parameters
adthe ad to play
Returns
true if play succeeds, false otherwise
boolean com.ooyala.android.OoyalaManagedAdsPlugin.playAd ( OoyalaManagedAdSpot  ad)
protected
boolean com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >.playAdsBeforeTime ( )
protectedinherited
void com.ooyala.android.OoyalaManagedAdsPlugin.processClickThrough ( )

This is called to process click through.

Implements com.ooyala.android.AdsLearnMoreInterface.

abstract void com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >.processNonLinearAd ( ad)
abstractprotectedinherited

process an ad while content is still playing e.g.

for VAST Nonlinear ad.

Parameters
adthe ad to process
void com.ooyala.android.OoyalaManagedAdsPlugin.processNonLinearAd ( OoyalaManagedAdSpot  ad)
protected
void com.ooyala.android.OoyalaManagedAdsPlugin.reset ( )

called when plugin should be reset

Implements com.ooyala.android.plugin.LifeCycleInterface.

void com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >.resetAds ( )
inherited

This is called to reset all ads to unplayed.

Implements com.ooyala.android.plugin.AdPluginInterface.

void com.ooyala.android.OoyalaManagedAdsPlugin.resume ( )

called when plugin should be resumed

Implements com.ooyala.android.plugin.LifeCycleInterface.

void com.ooyala.android.OoyalaManagedAdsPlugin.resume ( int  timeInMilliSecond,
State  stateToResume 
)

called when plugin should be resumed

Parameters
timeInMilliSecondplayhead time to seek after resume
stateToResumeplayer state after resume

Implements com.ooyala.android.plugin.LifeCycleInterface.

void com.ooyala.android.OoyalaManagedAdsPlugin.setSeekable ( boolean  s)
void com.ooyala.android.OoyalaManagedAdsPlugin.skipAd ( )

This is called to skip the current ad.

Implements com.ooyala.android.plugin.AdPluginInterface.

void com.ooyala.android.OoyalaManagedAdsPlugin.suspend ( )

called when plugin should be suspended

Implements com.ooyala.android.plugin.LifeCycleInterface.

void com.ooyala.android.OoyalaManagedAdsPlugin.suspend ( boolean  onlyRemoveView)

This is called when plugin should be suspended.

Parameters
onlyRemoveViewTo remove video view

Implements com.ooyala.android.plugin.LifeCycleInterface.

Member Data Documentation

AdSpotManager<T> com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >._adSpotManager
protectedinherited
OoyalaPlayer com.ooyala.android.OoyalaManagedAdsPlugin._player
protected
final int com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >.CONTENT_CHANGED = -1
staticprotectedinherited
final int com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >.PLUGIN_INIT = -2
staticprotectedinherited