Interface POBPlayer

  • All Implemented Interfaces:

    
    public interface POBPlayer
    
                        

    Interface, provides methods for basic functionality and events of player like play,pause,etc.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public interface POBPlayer.POBPlayerListener

      Player Listener to provides callback methods like ad ready to play, failed etc.

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract void setPlayerListener(@NonNull() POBPlayer.POBPlayerListener playerListener) Register listener to get Video Player callbacks
      abstract void setPrepareTimeout(int timeout) Set prepare timeout to handle Player url loading.
      abstract void setStallTimeout(int stallTimeout) Set stall timeout to handle Player buffering.
      abstract void start() Start current playback.
      abstract void pause() Pauses current playback.
      abstract void stop() Stops playback after playback has been onStart or onPause.
      abstract void setVolume(int leftVolume, int rightVolume) Set audio volume of Player
      abstract int getDuration() Gets the duration of the media.
      abstract int getVideoWidth() Get video player width
      abstract int getVideoHeight() Get video player height
      abstract void destroy() Method to do resource cleanup
      abstract void onSurfaceCreated(@NonNull() Surface surface) Method to notify surface created
      abstract void onSurfaceDestroyed(@NonNull() Surface surface) Method to notify surface destroyed
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • 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 volume
        rightVolume - 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