com.ooyala.android.freewheelsdk.OoyalaFreewheelManager Class Reference

The OoyalaFreewheelManager will play back all Freewheel ads affiliated with any playing Ooyala asset. More...

Inheritance diagram for com.ooyala.android.freewheelsdk.OoyalaFreewheelManager:
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

 OoyalaFreewheelManager (Activity parent, AbstractOoyalaPlayerLayoutController playerLayoutController)
 Initialize OoyalaFreewheelManager. More...
 
 OoyalaFreewheelManager (Activity parent, FrameLayout layout, OoyalaPlayer player)
 
void overrideFreewheelParameters (Map< String, String > fwParameters)
 Sets the Freewheel ad parameters to override values from Backlot or Ooyala Internals. More...
 
IAdContext getFreewheelContext ()
 Gets the Freewheel context. More...
 
void adsPlaying ()
 To be called only by the FWAdPlayer. More...
 
void update (Observable arg0, Object arg1)
 Implements the interface method, should only be called by ad plugin managed. More...
 
void reset ()
 Implements the interface method, should only be called by ad plugin managed. More...
 
void suspend ()
 Implements the interface method, should only be called by ad plugin managed. More...
 
void suspend (boolean onlyRemoveView)
 This is called when plugin should be suspended. More...
 
void resume ()
 Implements the interface method, should only be called by ad plugin managed. More...
 
void resume (int timeInMilliSecond, State stateToResume)
 Implements the interface method, should only be called by ad plugin managed. More...
 
void destroy ()
 destroy the current adPlayer More...
 
void configurationChanged (Configuration newConfig)
 This method is called when the device configuration changes while your component is running. More...
 
boolean onContentChanged ()
 Implements the interface method, should only be called by ad plugin managed. More...
 
boolean onPlayheadUpdate (int playhead)
 Implements the interface method, should only be called by ad plugin managed. More...
 
boolean onCuePoint (int cuePointIndex)
 Implements the interface method, should only be called by ad plugin managed. More...
 
boolean onContentError (int errorCode)
 Implements the interface method, should only be called by ad plugin managed. More...
 
void onAdModeEntered ()
 Implements the interface method, should only be called by ad plugin manager. More...
 
PlayerInterface getPlayerInterface ()
 Implements the interface method, should only be called by ad plugin manager. More...
 
void resetAds ()
 Implements the interface method, should only be called by ad plugin managed. More...
 
void onStateChange (StateNotifier notifier)
 Implements the interface method, should only be called by ad plugin manager. More...
 
void processClickThrough ()
 This is called to process click through. 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...
 
void onOverlayAdComplete ()
 
boolean allADSPlayed ()
 
boolean onInitialPlay ()
 called before content play starts More...
 
boolean onContentFinished ()
 called after content finish More...
 
Set< Integer > getCuePointsInMilliSeconds ()
 This returns the cue points. More...
 

Protected Member Functions

boolean playAd (FWAdSpot adToPlay)
 
void processNonLinearAd (FWAdSpot 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

The OoyalaFreewheelManager will play back all Freewheel ads affiliated with any playing Ooyala asset.

It will need some parameters to be properly configured in Third Party Module Metadata or passed in through overrideFreewheelParameters().

The OoyalaFreewheelManager works best with an OptimizedOoyalaPlayerLayoutController. If you do not use this layout controller, you will not get media controllers in fullscreen mode.

Constructor & Destructor Documentation

com.ooyala.android.freewheelsdk.OoyalaFreewheelManager.OoyalaFreewheelManager ( Activity  parent,
AbstractOoyalaPlayerLayoutController  playerLayoutController 
)

Initialize OoyalaFreewheelManager.

Parameters
parentActivity to be used to set into IAdContext
playerLayoutControllerOoyalaPlayerLayoutController to get the player and playerLayout
com.ooyala.android.freewheelsdk.OoyalaFreewheelManager.OoyalaFreewheelManager ( Activity  parent,
FrameLayout  layout,
OoyalaPlayer  player 
)

Member Function Documentation

void com.ooyala.android.freewheelsdk.OoyalaFreewheelManager.adsPlaying ( )

To be called only by the FWAdPlayer.

Let the manager know that ads are playing.

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

Implements com.ooyala.android.plugin.AdPluginInterface.

void com.ooyala.android.freewheelsdk.OoyalaFreewheelManager.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.freewheelsdk.OoyalaFreewheelManager.destroy ( )

destroy the current adPlayer

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.

IAdContext com.ooyala.android.freewheelsdk.OoyalaFreewheelManager.getFreewheelContext ( )

Gets the Freewheel context.

Returns
the Freewheel context
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.freewheelsdk.OoyalaFreewheelManager.getPlayerInterface ( )

Implements the interface method, should only be called by ad plugin manager.

Returns
the adPlayer

Implements com.ooyala.android.plugin.AdPluginInterface.

void com.ooyala.android.freewheelsdk.OoyalaFreewheelManager.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.freewheelsdk.OoyalaFreewheelManager.onAdModeEntered ( )

Implements the interface method, should only be called by ad plugin manager.

Implements com.ooyala.android.plugin.AdPluginInterface.

boolean com.ooyala.android.freewheelsdk.OoyalaFreewheelManager.onContentChanged ( )

Implements the interface method, should only be called by ad plugin managed.

Returns
true if current content changes, otherwise false

Implements com.ooyala.android.plugin.AdPluginInterface.

boolean com.ooyala.android.freewheelsdk.OoyalaFreewheelManager.onContentError ( int  errorCode)

Implements the interface method, should only be called by ad plugin managed.

Parameters
errorCodethe code number of the error
Returns
false

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.freewheelsdk.OoyalaFreewheelManager.onCuePoint ( int  cuePointIndex)

Implements the interface method, should only be called by ad plugin managed.

Parameters
cuePointIndexthe index of cuePoint
Returns
false

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.

void com.ooyala.android.freewheelsdk.OoyalaFreewheelManager.onOverlayAdComplete ( )
boolean com.ooyala.android.freewheelsdk.OoyalaFreewheelManager.onPlayheadUpdate ( int  playhead)

Implements the interface method, should only be called by ad plugin managed.

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.freewheelsdk.OoyalaFreewheelManager.onStateChange ( StateNotifier  notifier)

Implements the interface method, should only be called by ad plugin manager.

Parameters
notifierstate notifier

Implements com.ooyala.android.StateNotifierListener.

void com.ooyala.android.freewheelsdk.OoyalaFreewheelManager.overrideFreewheelParameters ( Map< String, String >  fwParameters)

Sets the Freewheel ad parameters to override values from Backlot or Ooyala Internals.

 Key                            Example Value
"fw_android_mrm_network_id"    "42015"
"fw_android_ad_server"         "http://demo.v.fwmrm.net/"
"fw_android_player_profile"    "fw_tutorial_android"
"fw_android_site_section_id"   "fw_tutorial_android"
"fw_android_video_asset_id"    "fw_simple_tutorial_asset"
Parameters
fwParametersDictionary with the above defined string keys and values
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.freewheelsdk.OoyalaFreewheelManager.playAd ( FWAdSpot  adToPlay)
protected
boolean com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >.playAdsBeforeTime ( )
protectedinherited
void com.ooyala.android.freewheelsdk.OoyalaFreewheelManager.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.freewheelsdk.OoyalaFreewheelManager.processNonLinearAd ( FWAdSpot  ad)
protected
void com.ooyala.android.freewheelsdk.OoyalaFreewheelManager.reset ( )

Implements the interface method, should only be called by ad plugin managed.

Implements com.ooyala.android.plugin.LifeCycleInterface.

void com.ooyala.android.freewheelsdk.OoyalaFreewheelManager.resetAds ( )

Implements the interface method, should only be called by ad plugin managed.

Implements com.ooyala.android.plugin.AdPluginInterface.

void com.ooyala.android.freewheelsdk.OoyalaFreewheelManager.resume ( )

Implements the interface method, should only be called by ad plugin managed.

Implements com.ooyala.android.plugin.LifeCycleInterface.

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

Implements the interface method, should only be called by ad plugin managed.

Parameters
timeInMilliSecondtime in millisecond
stateToResumestate to resume

Implements com.ooyala.android.plugin.LifeCycleInterface.

void com.ooyala.android.freewheelsdk.OoyalaFreewheelManager.skipAd ( )

This is called to skip the current ad.

Implements com.ooyala.android.plugin.AdPluginInterface.

void com.ooyala.android.freewheelsdk.OoyalaFreewheelManager.suspend ( )

Implements the interface method, should only be called by ad plugin managed.

Implements com.ooyala.android.plugin.LifeCycleInterface.

void com.ooyala.android.freewheelsdk.OoyalaFreewheelManager.suspend ( boolean  onlyRemoveView)

This is called when plugin should be suspended.

Parameters
onlyRemoveViewTo remove video view

Implements com.ooyala.android.plugin.LifeCycleInterface.

void com.ooyala.android.freewheelsdk.OoyalaFreewheelManager.update ( Observable  arg0,
Object  arg1 
)

Implements the interface method, should only be called by ad plugin managed.

Parameters
arg0
arg1notification passed by OoyalaPlayer

Member Data Documentation

AdSpotManager<T> com.ooyala.android.plugin.ManagedAdsPlugin< T extends AdSpot >._adSpotManager
protectedinherited
OoyalaPlayer com.ooyala.android.freewheelsdk.OoyalaFreewheelManager._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