Interface InstreamAdPlayer

  • All Implemented Interfaces:

    
    public interface InstreamAdPlayer
    
                        

    This interface must be implemented in advertisement videoplayer.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public interface InstreamAdPlayer.AdPlayerListener

      Calls from this listener must be implemented in videoplayer for calculating video ad statistics

    • 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 destroy() Shutdown all connections and release all resources
      abstract InstreamAdPlayer.AdPlayerListener getAdPlayerListener()
      abstract float getAdVideoDuration() Retrieving duration of current playing advertising video
      abstract float getAdVideoPosition() Retrieving play time left of current playing advertising video
      abstract View getView()
      abstract void pauseAdVideo() Call player to pause current playing ad
      abstract void playAdVideo(@NonNull() Uri uri, int width, int height) Call player to play videofile or stream with predefined dimensions
      abstract void playAdVideo(@NonNull() Uri uri, int width, int height, float position) Call player to play videofile or stream with predefined dimensions
      abstract void resumeAdVideo() Call player to resume current playing ad
      abstract void setAdPlayerListener(@Nullable() InstreamAdPlayer.AdPlayerListener listener) Sets listener for ad playing events
      abstract void setVolume(float volume) Setting the volume
      abstract void stopAdVideo() Call player to stop current video ad.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • destroy

         abstract void destroy()

        Shutdown all connections and release all resources

      • getAdVideoDuration

         abstract float getAdVideoDuration()

        Retrieving duration of current playing advertising video

      • getAdVideoPosition

         abstract float getAdVideoPosition()

        Retrieving play time left of current playing advertising video

      • getView

        @NonNull() abstract View getView()
        Returns:

        view, that hosts the player

      • pauseAdVideo

         abstract void pauseAdVideo()

        Call player to pause current playing ad

      • playAdVideo

         abstract void playAdVideo(@NonNull() Uri uri, int width, int height)

        Call player to play videofile or stream with predefined dimensions

        Parameters:
        uri - URI of video of stream
        width - width of video in pixels
        height - height of video in pixels
      • playAdVideo

         abstract void playAdVideo(@NonNull() Uri uri, int width, int height, float position)

        Call player to play videofile or stream with predefined dimensions

        Parameters:
        uri - URI of video of stream
        width - width of video in pixels
        height - height of video in pixels
        position - position of video.
      • resumeAdVideo

         abstract void resumeAdVideo()

        Call player to resume current playing ad

      • setVolume

         abstract void setVolume(float volume)

        Setting the volume

        Parameters:
        volume - volume
      • stopAdVideo

         abstract void stopAdVideo()

        Call player to stop current video ad. This call means we don't plan start same video ad in this player