Interface POBPlayer
-
- All Implemented Interfaces:
public interface POBPlayerInterface, provides methods for basic functionality and events of player like play,pause,etc.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfacePOBPlayer.POBPlayerListenerPlayer Listener to provides callback methods like ad ready to play, failed etc.
-
Method Summary
Modifier and Type Method Description abstract voidsetPlayerListener(@NonNull() POBPlayer.POBPlayerListener playerListener)Register listener to get Video Player callbacks abstract voidsetPrepareTimeout(int timeout)Set prepare timeout to handle Player url loading. abstract voidsetStallTimeout(int stallTimeout)Set stall timeout to handle Player buffering. abstract voidstart()Start current playback. abstract voidpause()Pauses current playback. abstract voidstop()Stops playback after playback has been onStart or onPause. abstract voidsetVolume(int leftVolume, int rightVolume)Set audio volume of Player abstract intgetDuration()Gets the duration of the media. abstract intgetVideoWidth()Get video player width abstract intgetVideoHeight()Get video player height abstract voiddestroy()Method to do resource cleanup abstract voidonSurfaceCreated(@NonNull() Surface surface)Method to notify surface created abstract voidonSurfaceDestroyed(@NonNull() Surface surface)Method to notify surface destroyed -
-
Method Detail
-
setPlayerListener
abstract void setPlayerListener(@NonNull() POBPlayer.POBPlayerListener playerListener)
Register listener to get Video Player callbacks
- Parameters:
playerListener- callback listener instance
-
setPrepareTimeout
abstract void setPrepareTimeout(int timeout)
Set prepare timeout to handle Player url loading.
- Parameters:
timeout- the timeout value in milliseconds.
-
setStallTimeout
abstract void setStallTimeout(int stallTimeout)
Set stall timeout to handle Player buffering.
- Parameters:
stallTimeout- the timeout value in milliseconds.
-
start
abstract void start()
Start current playback.
-
pause
abstract void pause()
Pauses current playback.
-
stop
abstract void stop()
Stops playback after playback has been onStart or onPause.
-
setVolume
abstract void setVolume(int leftVolume, int rightVolume)
Set audio volume of Player
- Parameters:
leftVolume- left volumerightVolume- right volume
-
getDuration
abstract int getDuration()
Gets the duration of the media.
- Returns:
the duration in milliseconds, if no duration is available (for example, if streaming live content), -1 is returned.
-
getVideoWidth
abstract int getVideoWidth()
Get video player width
- Returns:
video player width
-
getVideoHeight
abstract int getVideoHeight()
Get video player height
- Returns:
video player height
-
destroy
abstract void destroy()
Method to do resource cleanup
-
onSurfaceCreated
abstract void onSurfaceCreated(@NonNull() Surface surface)
Method to notify surface created
- Parameters:
surface- surface to render video
-
onSurfaceDestroyed
abstract void onSurfaceDestroyed(@NonNull() Surface surface)
Method to notify surface destroyed
- Parameters:
surface- surface to render video
-
-
-
-