Interface AdPlayer.Listener<T>

    • Method Detail

      • onAdProgress

        void onAdProgress​(long position,
                          @NonNull
                          T ad)
        Called when an ad has made progress.
        Parameters:
        position - the current position of the playback in milliseconds.
        ad - the current ad being played.
      • onDurationChanged

        void onDurationChanged​(long duration)
        Called when an Ad duration has been changed.
        Parameters:
        duration - the duration of the current Ad.
      • onAdStarted

        void onAdStarted​(@NonNull
                         T ad)
        Called when an Ad is started.
        Parameters:
        ad - the started Ad.
      • onAdCompleted

        void onAdCompleted​(@NonNull
                           T ad)
        Called when an Ad is completed.
        Parameters:
        ad - the completed Ad.
      • onAdPaused

        void onAdPaused​(@NonNull
                        T ad)
        Called when an Ad is paused.
        Parameters:
        ad - the paused ad.
      • onAdResumed

        void onAdResumed​(@NonNull
                         T ad)
        Called when an ad is resumed.
        Parameters:
        ad - the resumed Ad.
      • onAdSkipped

        void onAdSkipped​(@NonNull
                         T ad)
        Called when an ad is skipped.
        Parameters:
        ad - the skipped ad.
      • onError

        @Deprecated
        default void onError​(@NonNull
                             java.lang.Exception e)
        Deprecated.
        Use @link #onError(Object, Exception)}.
        Called when an error happened.
        Parameters:
        e - exception.
      • onError

        void onError​(@NonNull
                     T ad,
                     @NonNull
                     java.lang.Exception e)
        Called when an error happened.
        Parameters:
        ad - the ad that failed to play and originated the error.
        e - exception.