Interface InstreamAdPlayer


  • public interface InstreamAdPlayer
    This interface must be implemented in advertisement videoplayer.
    • Method Detail

      • getAdVideoDuration

        float getAdVideoDuration()
        Retrieving duration of current playing advertising video
      • getAdVideoPosition

        float getAdVideoPosition()
        Retrieving play time left of current playing advertising video
      • getView

        @NonNull
        android.view.View getView()
        Returns:
        view, that hosts the player
      • setAdPlayerListener

        void setAdPlayerListener​(@Nullable
                                 InstreamAdPlayer.AdPlayerListener listener)
        Sets listener for ad playing events
        Parameters:
        listener - listener should be set
      • playAdVideo

        void playAdVideo​(@NonNull
                         android.net.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

        void playAdVideo​(@NonNull
                         android.net.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. Used after swap
      • pauseAdVideo

        void pauseAdVideo()
        Call player to pause current playing ad
      • resumeAdVideo

        void resumeAdVideo()
        Call player to resume current playing ad
      • stopAdVideo

        void stopAdVideo()
        Call player to stop current video ad. This call means we don't plan start same video ad in this player
      • destroy

        void destroy()
        Shutdown all connections and release all resources
      • setVolume

        void setVolume​(float volume)
        Setting the volume
        Parameters:
        volume - volume