com.ooyala.cast.CastPlayer Class Reference

Control the playback e.g. More...

Inheritance diagram for com.ooyala.cast.CastPlayer:
com.ooyala.android.player.PlayerInterface

Public Member Functions

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 ()
 
boolean seekable ()
 
void seekToTime (int timeInMillis)
 Move the playhead to a new location in seconds with millisecond accuracy. More...
 
OoyalaPlayer.State getState ()
 This returns the player state. More...
 
int livePlayheadPercentage ()
 For Ooyala internal use only. More...
 
void seekToPercentLive (float percent)
 For Ooyala internal use only. More...
 
boolean isLiveClosedCaptionsAvailable ()
 
void setClosedCaptionsLanguage (String language)
 Set the displayed closed captions language. More...
 
OoyalaException getError ()
 
void setVolume (float volume)
 Set the volume for the player. More...
 
PlayerType getPlayerType ()
 Get the player's type. More...
 
boolean isMultiAudioAvailable ()
 
void createBitmapScreenshot (PlayerBitmapListener playerBitmapListener)
 
void onPlayheadTimeChanged (double newCurrentTime)
 
void onContentTreeFetched (String newEmbedCode)
 
void onPlaybackReady ()
 
void onClosedCaptionsInfoAvailable (String language)
 
void onPlayed ()
 
void onError (String receiverCode)
 
void onStateChanged (OoyalaPlayer.State state)
 
void onSeekCompleted ()
 
void createBitmapScreenshot (final PlayerBitmapListener playerBitmapListener)
 Create the bitmap screenshot of the current video frame. More...
 

Detailed Description

Control the playback e.g.

pausing, seeking. The lifecycle of the CastPlayer is to be managed by the CastManager, not by the 3rd party Android application.

Member Function Documentation

int com.ooyala.cast.CastPlayer.buffer ( )
Returns
the buffer percentage (between 0 and 100 inclusive)

Implements com.ooyala.android.player.PlayerInterface.

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

Implemented in com.ooyala.android.player.exoplayer.ExoStreamPlayer, com.ooyala.android.player.MoviePlayer, and com.ooyala.android.player.Player.

void com.ooyala.cast.CastPlayer.createBitmapScreenshot ( PlayerBitmapListener  playerBitmapListener)
int com.ooyala.cast.CastPlayer.currentTime ( )
Returns
current time

Implements com.ooyala.android.player.PlayerInterface.

int com.ooyala.cast.CastPlayer.duration ( )
Returns
duration.

Implements com.ooyala.android.player.PlayerInterface.

OoyalaException com.ooyala.cast.CastPlayer.getError ( )
PlayerType com.ooyala.cast.CastPlayer.getPlayerType ( )

Get the player's type.

Implements com.ooyala.android.player.PlayerInterface.

OoyalaPlayer.State com.ooyala.cast.CastPlayer.getState ( )

This returns the player state.

Returns
the state

Implements com.ooyala.android.player.PlayerInterface.

boolean com.ooyala.cast.CastPlayer.isLiveClosedCaptionsAvailable ( )
Returns
true if the player can support live closed captions

Implements com.ooyala.android.player.PlayerInterface.

boolean com.ooyala.cast.CastPlayer.isMultiAudioAvailable ( )
Returns
true if the current asset has several audio tracks

Implements com.ooyala.android.player.PlayerInterface.

int com.ooyala.cast.CastPlayer.livePlayheadPercentage ( )

For Ooyala internal use only.

Implements com.ooyala.android.player.PlayerInterface.

void com.ooyala.cast.CastPlayer.onClosedCaptionsInfoAvailable ( String  language)
void com.ooyala.cast.CastPlayer.onContentTreeFetched ( String  newEmbedCode)
void com.ooyala.cast.CastPlayer.onError ( String  receiverCode)
void com.ooyala.cast.CastPlayer.onPlaybackReady ( )
void com.ooyala.cast.CastPlayer.onPlayed ( )
void com.ooyala.cast.CastPlayer.onPlayheadTimeChanged ( double  newCurrentTime)
void com.ooyala.cast.CastPlayer.onSeekCompleted ( )
void com.ooyala.cast.CastPlayer.onStateChanged ( OoyalaPlayer.State  state)
void com.ooyala.cast.CastPlayer.pause ( )

This is called when pause is clicked.

Implements com.ooyala.android.player.PlayerInterface.

void com.ooyala.cast.CastPlayer.play ( )

This is called when play is clicked.

Implements com.ooyala.android.player.PlayerInterface.

boolean com.ooyala.cast.CastPlayer.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.cast.CastPlayer.seekToPercentLive ( float  percent)

For Ooyala internal use only.

Seeking to live is not currently supported.

Implements com.ooyala.android.player.PlayerInterface.

void com.ooyala.cast.CastPlayer.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.cast.CastPlayer.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.cast.CastPlayer.setVolume ( float  volume)

Set the volume for the player.

Implements com.ooyala.android.player.PlayerInterface.

void com.ooyala.cast.CastPlayer.stop ( )

This is called when stop is clicked.

Implements com.ooyala.android.player.PlayerInterface.