com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot > Class Template Referenceabstract
Inheritance diagram for com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >:
com.ooyala.android.plugin.AdPluginInterface com.ooyala.android.plugin.LifeCycleInterface com.ooyala.android.AdsLearnMoreInterface com.ooyala.android.freewheelsdk.OoyalaFreewheelManager com.ooyala.android.OoyalaManagedAdsPlugin

Public Member Functions

 ManagedAdsPlugin ()
 
boolean onContentChanged ()
 This is called when content changed. More...
 
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...
 
PlayerInterface getPlayerInterface ()
 This is called ooyala UI pass down UI related events. More...
 
void skipAd ()
 This is called to skip the current ad. More...
 
void onAdIconClicked (int index)
 This is called when an icon is clicked. More...
 
boolean allADSPlayed ()
 
void reset ()
 This is called when plugin should be reset. More...
 
void suspend ()
 This is called when plugin should be suspended. More...
 
void suspend (boolean onlyRemoveView)
 This is called when plugin should be suspended. More...
 
void resume ()
 This is called when plugin should be resumed. More...
 
void resume (int timeInMillisecond, State stateToResume)
 This is called when plugin should be resumed. More...
 
void destroy ()
 This is 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...
 
void processClickThrough ()
 This is called to process click through. More...
 

Protected Member Functions

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

AdSpotManager< T > _adSpotManager
 

Static Protected Attributes

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

Constructor & Destructor Documentation

Member Function Documentation

boolean com.ooyala.android.plugin.AdPluginInterface.allADSPlayed ( )
inherited
void com.ooyala.android.plugin.LifeCycleInterface.configurationChanged ( Configuration  newConfig)
inherited

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

Parameters
newConfigThe new device configuration.

Implemented in com.ooyala.android.imasdk.OoyalaIMAManager, com.ooyala.android.freewheelsdk.OoyalaFreewheelManager, com.ooyala.android.freewheelsdk.FWAdPlayer, com.ooyala.android.player.Player, and com.ooyala.android.OoyalaManagedAdsPlugin.

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

This returns the cue points.

Implements com.ooyala.android.plugin.AdPluginInterface.

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

called after content finish

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

This is called ooyala UI pass down UI related events.

Returns
an object that implements PlayerInterface if plugin needs to process ui events, null if these events should be ignored.

Implemented in com.ooyala.android.imasdk.OoyalaIMAManager, com.ooyala.android.freewheelsdk.OoyalaFreewheelManager, and com.ooyala.android.OoyalaManagedAdsPlugin.

void com.ooyala.android.plugin.AdPluginInterface.onAdIconClicked ( int  index)
inherited

This is called when an icon is clicked.

Parameters
indexthe icon index

Implemented in com.ooyala.android.imasdk.OoyalaIMAManager, com.ooyala.android.freewheelsdk.OoyalaFreewheelManager, and com.ooyala.android.OoyalaManagedAdsPlugin.

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

called on content

Implements com.ooyala.android.plugin.AdPluginInterface.

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

This is called when content changed.

Returns
a token string if plugin wants take control, null otherwise

Implements com.ooyala.android.plugin.AdPluginInterface.

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

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 ( )

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)

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 ( )

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)

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.

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

play the ad after content is paused

Parameters
adthe ad to play
Returns
true if play succeeds, false otherwise
boolean com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >.playAdsBeforeTime ( )
protected
abstract void com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >.processNonLinearAd ( ad)
abstractprotected

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

for VAST Nonlinear ad.

Parameters
adthe ad to process
void com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >.resetAds ( )

This is called to reset all ads to unplayed.

Implements com.ooyala.android.plugin.AdPluginInterface.

void com.ooyala.android.plugin.LifeCycleInterface.resume ( int  timeInMillisecond,
State  stateToResume 
)
inherited
void com.ooyala.android.plugin.AdPluginInterface.skipAd ( )
inherited
void com.ooyala.android.plugin.LifeCycleInterface.suspend ( boolean  onlyRemoveView)
inherited

Member Data Documentation

AdSpotManager<T> com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >._adSpotManager
protected
final int com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >.CONTENT_CHANGED = -1
staticprotected
final int com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >.PLUGIN_INIT = -2
staticprotected