This class represents the Base Movie Player that plays IMA Ad spots. More...

Inheritance diagram for com.ooyala.android.imasdk.IMAAdPlayer:
com.ooyala.android.player.AdMoviePlayer com.ooyala.android.player.MoviePlayer com.ooyala.android.AdsLearnMoreInterface com.ooyala.android.player.Player com.ooyala.android.player.PlayerInterface com.ooyala.android.plugin.LifeCycleInterface

Public Member Functions

void init (final OoyalaPlayer parent, AdSpot ad, StateNotifier notifier)
 Remember if we sent ad-start, because IMA calls same method for first play and resumes. More...
 
void play ()
 Start or resume the current ad playback. More...
 
void playIMA ()
 Start or resume the current ad playback. More...
 
void pause ()
 Pause the current ad playback. More...
 
void pauseIMA ()
 Pause the current ad playback. More...
 
void destroy ()
 Destroy this IMAAdPlayer. More...
 
void update (Observable arg0, Object arg1)
 Send notification when playhead changed or ad completed. More...
 
AdSpot getAd ()
 Fetch the current AdSpot. More...
 
void setIMAManager (OoyalaIMAManager imaManager)
 Set current OoyalaIMAManager to be the given OoyalaIMAManager. More...
 
OoyalaIMAManager getIMAManager ()
 Fetch the current. More...
 
void setState (State state)
 Set current sate to be the given state. More...
 
void processClickThrough ()
 Do nothing since IMA SDK take care of click through. More...
 
void skipAd ()
 
void init (OoyalaPlayer parent, AdSpot ad, StateNotifier notifier)
 
void init (OoyalaPlayer parent, Set< Stream > streams)
 
StateNotifier getNotifier ()
 
void updateLearnMoreButton (FrameLayout layout, int topMargin)
 
void onAdIconClicked (int index)
 
boolean isMultiAudioAvailable ()
 
void setLive (boolean isLive)
 Specify if this baseplayer will be playing a live video or not (default false) More...
 
StreamPlayer getBasePlayer ()
 
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 suspend (int millisToResume, State stateToResume, boolean onlyRemoveView)
 
void resume ()
 This is called when plugin should be resumed. More...
 
void resume (int millisToResume, State stateToResume)
 This is called when plugin should be resumed. More...
 
int timeToResume ()
 
View getView ()
 
void setParent (OoyalaPlayer parent)
 
void stop ()
 This is called when stop is clicked. More...
 
int currentTime ()
 
int duration ()
 
int buffer ()
 
int getBufferPercentage ()
 
int livePlayheadPercentage ()
 
void seekToPercentLive (float percent)
 Seek to the given percent position of scrubber for live stream playback. More...
 
boolean seekable ()
 
void setSeekable (boolean seekable)
 
void seekToTime (int timeInMillis)
 Move the playhead to a new location in seconds with millisecond accuracy. More...
 
SeekStyle getSeekStyle ()
 
State getState ()
 This returns the player state. More...
 
OoyalaException getError ()
 
boolean isPlaying ()
 
boolean isLiveClosedCaptionsAvailable ()
 
void setClosedCaptionsLanguage (String language)
 Set the displayed closed captions language. More...
 
void setVolume (float volume)
 Set the volume for the player. More...
 
PlayerType getPlayerType ()
 Get the player's type. More...
 
void createBitmapScreenshot (final PlayerBitmapListener playerBitmapListener)
 Create the bitmap screenshot of the current video frame. More...
 
void setError (OoyalaException error)
 
OoyalaPlayer getParent ()
 
void configurationChanged (Configuration newConfig)
 This method is called when the device configuration changes while your component is running. More...
 

Protected Member Functions

StreamPlayer createStreamPlayer ()
 

Protected Attributes

StateNotifier _notifier
 
Set< Stream_streams
 
boolean _seekable = true
 
OoyalaPlayer _parent = null
 
OoyalaException _error = null
 The Player's current error if it exists. More...
 
ControlSharingSurfaceView _view = null
 
int _buffer = 0
 
State _state = State.INIT
 

Static Protected Attributes

static final String DRM_TENENT_PATH = "/sas/drm2/%s/%s/%s/%s"
 

Detailed Description

This class represents the Base Movie Player that plays IMA Ad spots.

And it is also a interface between OoyalaPlayer and IMA SDK for IMA ads playabck

Member Function Documentation

int com.ooyala.android.player.MoviePlayer.buffer ( )
inherited
Returns
the buffer percentage (between 0 and 100 inclusive)

Implements com.ooyala.android.player.PlayerInterface.

void com.ooyala.android.player.Player.configurationChanged ( Configuration  newConfig)
inherited

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.player.MoviePlayer.createBitmapScreenshot ( final PlayerBitmapListener  playerBitmapListener)
inherited

Create the bitmap screenshot of the current video frame.

Parameters
playerBitmapListenerthe interface that must be implemented in order to receive bitmap screenshot from Ooyala ExoPlayer

Implements com.ooyala.android.player.PlayerInterface.

StreamPlayer com.ooyala.android.player.AdMoviePlayer.createStreamPlayer ( )
protectedinherited
int com.ooyala.android.player.MoviePlayer.currentTime ( )
inherited
Returns
current time

Implements com.ooyala.android.player.PlayerInterface.

void com.ooyala.android.imasdk.IMAAdPlayer.destroy ( )
int com.ooyala.android.player.MoviePlayer.duration ( )
inherited
Returns
duration.

Implements com.ooyala.android.player.PlayerInterface.

AdSpot com.ooyala.android.imasdk.IMAAdPlayer.getAd ( )

Fetch the current AdSpot.

Returns
current AdSpot
StreamPlayer com.ooyala.android.player.MoviePlayer.getBasePlayer ( )
inherited
int com.ooyala.android.player.MoviePlayer.getBufferPercentage ( )
inherited
OoyalaException com.ooyala.android.player.MoviePlayer.getError ( )
inherited
OoyalaIMAManager com.ooyala.android.imasdk.IMAAdPlayer.getIMAManager ( )

Fetch the current.

Returns
current OoyalaIMAManager
StateNotifier com.ooyala.android.player.AdMoviePlayer.getNotifier ( )
inherited
OoyalaPlayer com.ooyala.android.player.Player.getParent ( )
inherited
PlayerType com.ooyala.android.player.MoviePlayer.getPlayerType ( )
inherited

Get the player's type.

Implements com.ooyala.android.player.PlayerInterface.

SeekStyle com.ooyala.android.player.MoviePlayer.getSeekStyle ( )
inherited
State com.ooyala.android.player.MoviePlayer.getState ( )
inherited

This returns the player state.

Returns
the state

Implements com.ooyala.android.player.PlayerInterface.

View com.ooyala.android.player.MoviePlayer.getView ( )
inherited
void com.ooyala.android.player.AdMoviePlayer.init ( OoyalaPlayer  parent,
AdSpot  ad,
StateNotifier  notifier 
)
inherited
void com.ooyala.android.imasdk.IMAAdPlayer.init ( final OoyalaPlayer  parent,
AdSpot  ad,
StateNotifier  notifier 
)

Remember if we sent ad-start, because IMA calls same method for first play and resumes.

Initialize an IMAAdPlayer

Parameters
parentan current OoyalaPlayer
adan AdSpot that holds the current ads information
notifiera notifier which sends notification to OoyalaPlayer or UI Controls for state change or playback events
void com.ooyala.android.player.MoviePlayer.init ( OoyalaPlayer  parent,
Set< Stream streams 
)
inherited
boolean com.ooyala.android.player.MoviePlayer.isLiveClosedCaptionsAvailable ( )
inherited
Returns
true if the player can support live closed captions

Implements com.ooyala.android.player.PlayerInterface.

boolean com.ooyala.android.player.AdMoviePlayer.isMultiAudioAvailable ( )
inherited
Returns
true if the current asset has several audio tracks

Implements com.ooyala.android.player.PlayerInterface.

boolean com.ooyala.android.player.MoviePlayer.isPlaying ( )
inherited
int com.ooyala.android.player.MoviePlayer.livePlayheadPercentage ( )
inherited
Returns
the percentage of the cursor should be on scrubber for live stream playback

Implements com.ooyala.android.player.PlayerInterface.

void com.ooyala.android.player.AdMoviePlayer.onAdIconClicked ( int  index)
inherited
void com.ooyala.android.imasdk.IMAAdPlayer.pause ( )

Pause the current ad playback.

This "pause" is called from OoyalaPlayer.pause() and also responses to UI pause button click.

Implements com.ooyala.android.player.PlayerInterface.

void com.ooyala.android.imasdk.IMAAdPlayer.pauseIMA ( )

Pause the current ad playback.

This "pauseIMA" is called from OoyalaPlayerIMAWrapper.pauseAd() when IMA SDK wants to pause the ad playback.

void com.ooyala.android.imasdk.IMAAdPlayer.play ( )

Start or resume the current ad playback.

This "play" is called from OoyalaPlayer.play() and also responses to UI play button click.

Implements com.ooyala.android.player.PlayerInterface.

void com.ooyala.android.imasdk.IMAAdPlayer.playIMA ( )

Start or resume the current ad playback.

This "playIMA" is called from OoyalaPlayerIMAWrapper.playAd() when IMA SDK wants to play/resume the ad playback.

void com.ooyala.android.imasdk.IMAAdPlayer.processClickThrough ( )

Do nothing since IMA SDK take care of click through.

Implements com.ooyala.android.AdsLearnMoreInterface.

void com.ooyala.android.player.MoviePlayer.reset ( )
inherited

This is called when plugin should be reset.

Implements com.ooyala.android.plugin.LifeCycleInterface.

void com.ooyala.android.player.MoviePlayer.resume ( )
inherited

This is called when plugin should be resumed.

Implements com.ooyala.android.plugin.LifeCycleInterface.

void com.ooyala.android.player.MoviePlayer.resume ( int  timeInMillisecond,
State  stateToResume 
)
inherited

This is called when plugin should be resumed.

Parameters
timeInMillisecondthe playhead time to set
stateToResumethe player state after resume

Implements com.ooyala.android.plugin.LifeCycleInterface.

boolean com.ooyala.android.player.MoviePlayer.seekable ( )
inherited
Returns
true if the current player is seekable, false if there is no current player or it is not seekable

Implements com.ooyala.android.player.PlayerInterface.

void com.ooyala.android.player.MoviePlayer.seekToPercentLive ( float  percent)
inherited

Seek to the given percent position of scrubber for live stream playback.

Parameters
percentThe percent of scrubber the cursor ends after seek

Implements com.ooyala.android.player.PlayerInterface.

void com.ooyala.android.player.MoviePlayer.seekToTime ( int  timeInMillis)
inherited

Move the playhead to a new location in seconds with millisecond accuracy.

Parameters
timeInMillistime in milliseconds

Implements com.ooyala.android.player.PlayerInterface.

void com.ooyala.android.player.MoviePlayer.setClosedCaptionsLanguage ( String  language)
inherited

Set the displayed closed captions language.

Parameters
language2 letter country code of the language to display or nil to hide closed captions

Implements com.ooyala.android.player.PlayerInterface.

void com.ooyala.android.player.Player.setError ( OoyalaException  error)
inherited
void com.ooyala.android.imasdk.IMAAdPlayer.setIMAManager ( OoyalaIMAManager  imaManager)

Set current OoyalaIMAManager to be the given OoyalaIMAManager.

Parameters
imaManagerthe OoyalaIMAManager to be set
void com.ooyala.android.player.MoviePlayer.setLive ( boolean  isLive)
inherited

Specify if this baseplayer will be playing a live video or not (default false)

Parameters
isLive
void com.ooyala.android.player.MoviePlayer.setParent ( OoyalaPlayer  parent)
inherited
void com.ooyala.android.player.MoviePlayer.setSeekable ( boolean  seekable)
inherited
void com.ooyala.android.imasdk.IMAAdPlayer.setState ( State  state)

Set current sate to be the given state.

Parameters
statestate of ad playback
void com.ooyala.android.player.MoviePlayer.setVolume ( float  volume)
inherited

Set the volume for the player.

Implements com.ooyala.android.player.PlayerInterface.

void com.ooyala.android.imasdk.IMAAdPlayer.skipAd ( )
void com.ooyala.android.player.MoviePlayer.stop ( )
inherited

This is called when stop is clicked.

Implements com.ooyala.android.player.PlayerInterface.

void com.ooyala.android.player.MoviePlayer.suspend ( )
inherited

This is called when plugin should be suspended.

Implements com.ooyala.android.plugin.LifeCycleInterface.

void com.ooyala.android.player.MoviePlayer.suspend ( boolean  onlyRemoveView)
inherited

This is called when plugin should be suspended.

Parameters
onlyRemoveViewTo remove video view

Implements com.ooyala.android.plugin.LifeCycleInterface.

void com.ooyala.android.player.MoviePlayer.suspend ( int  millisToResume,
State  stateToResume,
boolean  onlyRemoveView 
)
inherited
int com.ooyala.android.player.MoviePlayer.timeToResume ( )
inherited
void com.ooyala.android.imasdk.IMAAdPlayer.update ( Observable  arg0,
Object  arg1 
)

Send notification when playhead changed or ad completed.

Parameters
arg0the Observable object
arg1current notification
void com.ooyala.android.player.AdMoviePlayer.updateLearnMoreButton ( FrameLayout  layout,
int  topMargin 
)
inherited

Member Data Documentation

int com.ooyala.android.player.Player._buffer = 0
protectedinherited
OoyalaException com.ooyala.android.player.Player._error = null
protectedinherited

The Player's current error if it exists.

StateNotifier com.ooyala.android.player.AdMoviePlayer._notifier
protectedinherited
OoyalaPlayer com.ooyala.android.player.Player._parent = null
protectedinherited
boolean com.ooyala.android.player.MoviePlayer._seekable = true
protectedinherited
State com.ooyala.android.player.Player._state = State.INIT
protectedinherited
Set<Stream> com.ooyala.android.player.MoviePlayer._streams
protectedinherited
ControlSharingSurfaceView com.ooyala.android.player.Player._view = null
protectedinherited
final String com.ooyala.android.player.MoviePlayer.DRM_TENENT_PATH = "/sas/drm2/%s/%s/%s/%s"
staticprotectedinherited