com.ooyala.android.player.Player Class Reference

The interface that must be implemented in order to plug into OoyalaPlayer and Ooyala UI. More...

Inheritance diagram for com.ooyala.android.player.Player:
com.ooyala.android.player.PlayerInterface com.ooyala.android.plugin.LifeCycleInterface com.ooyala.android.player.MoviePlayer com.ooyala.android.player.StreamPlayer com.ooyala.android.player.AdMoviePlayer com.ooyala.android.player.ExoMoviePlayer com.ooyala.android.player.BaseStreamPlayer com.ooyala.android.player.exoplayer.BaseExoPlayer com.ooyala.android.ads.ooyala.OoyalaAdPlayer com.ooyala.android.ads.vast.VASTAdPlayer com.ooyala.android.imasdk.IMAAdPlayer com.ooyala.android.player.exoplayer.ExoStreamPlayer

Public Member Functions

void init (OoyalaPlayer parent, Set< Stream > streams)
 
State getState ()
 This returns the player state. More...
 
OoyalaException getError ()
 
void setError (OoyalaException error)
 
View getView ()
 
void setParent (OoyalaPlayer parent)
 
OoyalaPlayer getParent ()
 
int getBufferPercentage ()
 
boolean isPlaying ()
 
boolean isLiveClosedCaptionsAvailable ()
 Returns if the current player has found live closed caption info in the stream. More...
 
SeekStyle getSeekStyle ()
 
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 pause ()
 This is called when pause is clicked. More...
 
void play ()
 This is called when play is clicked. More...
 
void stop ()
 This is called when stop is clicked. More...
 
int currentTime ()
 
int duration ()
 
int buffer ()
 
void seekToTime (int timeInMillis)
 Move the playhead to a new location in seconds with millisecond accuracy. More...
 
boolean seekable ()
 
int livePlayheadPercentage ()
 
void seekToPercentLive (float percent)
 Seek to the given percent position of scrubber for live stream playback. More...
 
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...
 
boolean isMultiAudioAvailable ()
 
void createBitmapScreenshot (final PlayerBitmapListener playerBitmapListener)
 Create the bitmap screenshot of the current video frame. More...
 

Protected Member Functions

 Player ()
 Init the player. More...
 
void setState (State state)
 

Protected Attributes

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
 

Detailed Description

The interface that must be implemented in order to plug into OoyalaPlayer and Ooyala UI.

Constructor & Destructor Documentation

com.ooyala.android.player.Player.Player ( )
protected

Init the player.

Member Function Documentation

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

Implements com.ooyala.android.player.PlayerInterface.

void com.ooyala.android.player.Player.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.player.Player.createBitmapScreenshot ( final PlayerBitmapListener  playerBitmapListener)

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.

int com.ooyala.android.player.Player.currentTime ( )
Returns
current time

Implements com.ooyala.android.player.PlayerInterface.

void com.ooyala.android.player.Player.destroy ( )

This is called when plugin should be destroyed.

Implements com.ooyala.android.plugin.LifeCycleInterface.

int com.ooyala.android.player.Player.duration ( )
Returns
duration.

Implements com.ooyala.android.player.PlayerInterface.

int com.ooyala.android.player.Player.getBufferPercentage ( )
OoyalaException com.ooyala.android.player.Player.getError ( )
OoyalaPlayer com.ooyala.android.player.Player.getParent ( )
PlayerType com.ooyala.android.player.Player.getPlayerType ( )

Get the player's type.

Implements com.ooyala.android.player.PlayerInterface.

SeekStyle com.ooyala.android.player.Player.getSeekStyle ( )
State com.ooyala.android.player.Player.getState ( )

This returns the player state.

Returns
the state

Implements com.ooyala.android.player.PlayerInterface.

View com.ooyala.android.player.Player.getView ( )
void com.ooyala.android.player.Player.init ( OoyalaPlayer  parent,
Set< Stream streams 
)
boolean com.ooyala.android.player.Player.isLiveClosedCaptionsAvailable ( )

Returns if the current player has found live closed caption info in the stream.

Returns
true if the stream has embedded live closed captions

Implements com.ooyala.android.player.PlayerInterface.

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

Implements com.ooyala.android.player.PlayerInterface.

boolean com.ooyala.android.player.Player.isPlaying ( )
int com.ooyala.android.player.Player.livePlayheadPercentage ( )
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.Player.pause ( )

This is called when pause is clicked.

Implements com.ooyala.android.player.PlayerInterface.

void com.ooyala.android.player.Player.play ( )

This is called when play is clicked.

Implements com.ooyala.android.player.PlayerInterface.

void com.ooyala.android.player.Player.reset ( )

This is called when plugin should be reset.

Implements com.ooyala.android.plugin.LifeCycleInterface.

void com.ooyala.android.player.Player.resume ( )

This is called when plugin should be resumed.

Implements com.ooyala.android.plugin.LifeCycleInterface.

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

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.Player.seekable ( )
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.Player.seekToPercentLive ( float  percent)

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.Player.seekToTime ( int  timeInMillis)

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.Player.setClosedCaptionsLanguage ( String  language)

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)
void com.ooyala.android.player.Player.setParent ( OoyalaPlayer  parent)
void com.ooyala.android.player.Player.setState ( State  state)
protected
void com.ooyala.android.player.Player.setVolume ( float  volume)

Set the volume for the player.

Implements com.ooyala.android.player.PlayerInterface.

void com.ooyala.android.player.Player.stop ( )

This is called when stop is clicked.

Implements com.ooyala.android.player.PlayerInterface.

void com.ooyala.android.player.Player.suspend ( )

This is called when plugin should be suspended.

Implements com.ooyala.android.plugin.LifeCycleInterface.

void com.ooyala.android.player.Player.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

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

The Player's current error if it exists.

OoyalaPlayer com.ooyala.android.player.Player._parent = null
protected
State com.ooyala.android.player.Player._state = State.INIT
protected
ControlSharingSurfaceView com.ooyala.android.player.Player._view = null
protected