com.ooyala.android.imasdk.VideoProgressCalculator Class Reference

This class helps OoyalaPlayerIMAWrapper to calculate VideoProgressUpdate for both content and ad playback so that IMA SDK can keep track of the content and ad playback. More...

Public Member Functions

 VideoProgressCalculator (OoyalaPlayer player, boolean isPlayingIMAAd, int lastPausedMs, int liveContentTimePlayed)
 Initialize a VideoProgressCalculator. More...
 
VideoProgressCalculatorRunningState getRunningState ()
 Fetch current VideoProgressCalculatorRunningState. More...
 
VideoProgressUpdate getContentProgress ()
 Calculate and return the VideoProgressUpdate for current content. More...
 
VideoProgressUpdate getAdProgress ()
 Calculate and return the VideoProgressUpdate for current IMA Ad. More...
 

Detailed Description

This class helps OoyalaPlayerIMAWrapper to calculate VideoProgressUpdate for both content and ad playback so that IMA SDK can keep track of the content and ad playback.

Constructor & Destructor Documentation

com.ooyala.android.imasdk.VideoProgressCalculator.VideoProgressCalculator ( OoyalaPlayer  player,
boolean  isPlayingIMAAd,
int  lastPausedMs,
int  liveContentTimePlayed 
)

Initialize a VideoProgressCalculator.

Parameters
playerthe current OoyalaPlayer
isPlayingIMAAdtrue if an IMA ad is playing, false other wise
lastPausedMsthe time that content video is paused last time in millisecond
liveContentTimePlayedthe played time of the current Live content in millisecond

Member Function Documentation

VideoProgressUpdate com.ooyala.android.imasdk.VideoProgressCalculator.getAdProgress ( )

Calculate and return the VideoProgressUpdate for current IMA Ad.

Returns
the VideoProgressUpdate for current IMA Ad
VideoProgressUpdate com.ooyala.android.imasdk.VideoProgressCalculator.getContentProgress ( )

Calculate and return the VideoProgressUpdate for current content.

Returns
VideoProgressUpdate for current content
VideoProgressCalculatorRunningState com.ooyala.android.imasdk.VideoProgressCalculator.getRunningState ( )