Interface InstreamAd.InstreamAdListener

Enclosing class:
InstreamAd

public static interface InstreamAd.InstreamAdListener
  • Method Details

    • onLoad

      void onLoad(@NonNull InstreamAd ad)
      Will be called if the ad is loaded successfully.
      Parameters:
      ad - current ad instance
    • onNoAd

      void onNoAd(@NonNull IAdLoadingError adLoadingError, @NonNull InstreamAd ad)
      Will be called if the ad was not found.
      Parameters:
      adLoadingError - of no ads
      ad - current ad instance
    • onError

      void onError(@NonNull String reason, @NonNull InstreamAd ad)
      Will be called in case of any error in the ad displaying process.
      Parameters:
      reason - reason for error
      ad - current ad instance
    • onBannerStart

      void onBannerStart(@NonNull InstreamAd ad, @NonNull InstreamAd.InstreamAdBanner banner)
      Will be called when the video banner starts showing.
      Parameters:
      ad - current ad instance
      banner - banner which was started
      See Also:
    • onVideoMotionBannerStart

      void onVideoMotionBannerStart(@NonNull InstreamAd ad, @NonNull InstreamAd.InstreamAdVideoMotionBanner banner)
      Will be called when the videoMotionData starts showing.
      Parameters:
      ad - current ad instance
      banner - banner which was started
      See Also:
    • onVideoMotionBannerComplete

      void onVideoMotionBannerComplete(@NonNull InstreamAd ad, @NonNull InstreamAd.InstreamAdVideoMotionBanner banner)
      Will be called when the VideoMotionData completes
      Parameters:
      ad - current ad instance
      banner - banner which was completed
      See Also:
    • onBannerPause

      void onBannerPause(@NonNull InstreamAd ad, @NonNull InstreamAd.InstreamAdBanner banner)
      Will be called when the ad video pauses
      Parameters:
      ad - current ad instance
      banner - banner which was paused
      See Also:
    • onBannerResume

      void onBannerResume(@NonNull InstreamAd ad, @NonNull InstreamAd.InstreamAdBanner banner)
      Will be called when the ad video resumes from pause
      Parameters:
      ad - current ad instance
      banner - banner which was resumed
      See Also:
    • onBannerComplete

      void onBannerComplete(@NonNull InstreamAd ad, @NonNull InstreamAd.InstreamAdBanner banner)
      Will be called when the ad video banner completes
      Parameters:
      ad - current ad instance
      banner - banner which was completed
      See Also:
    • onBannerTimeLeftChange

      void onBannerTimeLeftChange(float timeLeft, float duration, @NonNull InstreamAd ad)
      Will be called multiple times for each banner between the onBannerStart and onBannerComplete events.
      Parameters:
      timeLeft - ad video left time in seconds
      duration - duration of ad video in seconds
      ad - current ad instance
    • onComplete

      void onComplete(@NonNull String section, @NonNull InstreamAd ad)
      Will be called when the ad video section completes
      Parameters:
      section - the name of completed video ad section
      ad - current ad instance
    • onBannerShouldClose

      void onBannerShouldClose()
      The method will be called when the ad should be closed when the adchoice item is clicked, for this, in the implementation of this method, you need to call instreamAd.skip()
    • onVideoMotionBannerShouldClose

      void onVideoMotionBannerShouldClose(@NonNull InstreamAd ad, @NonNull InstreamAd.InstreamAdVideoMotionBanner banner)
      The method will be called when the ad should be closed when the adchoice item is clicked, for this, in the implementation of this method, you need to call VideoMotionPlayerListener.onCloseByUser(Context context)