Interface InstreamAdPlaybackListener

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • onComplete

         abstract Unit onComplete()

        Called when the entire ad playback is completed successfully.

        This indicates that all videos in the ad sequence have finished playing.

      • onFailed

         abstract Unit onFailed(AdException adException)

        Called when the ad playback fails during InstreamAd.attachPlayerView or InstreamAd.start.

        After this callback, the ad playback will not continue. Check AdException.message for details on the failure cause.

        Parameters:
        adException - Exception containing information about the failure.
      • onStarted

         abstract Unit onStarted()

        Called when the ad playback is started successfully.

      • onVideoAdTimeLeftChange

         Unit onVideoAdTimeLeftChange(VideoAd video, Float timeLeft)

        Called periodically when the remaining time of the current video changes.

        You can use this to show a countdown timer or enable a skip button once skipping is allowed.

        Parameters:
        video - Information about the current ad video.
        timeLeft - Time in seconds remaining until the end of the video or until skipping is allowed.
      • onVideoAdStarted

         abstract Unit onVideoAdStarted(VideoAd video)

        Called when an individual video in the ad starts playing.

        Use the information from VideoAd to update your UI.

        Parameters:
        video - Information about the current ad video.
      • onVideoAdPaused

         abstract Unit onVideoAdPaused(VideoAd video)

        Called when the current video is paused by user actions or system events, such as clicking the ad or turning off the device screen.

        Parameters:
        video - Information about the current ad video.
      • onVideoAdResumed

         abstract Unit onVideoAdResumed(VideoAd video)

        Called when the current video is resumed after being paused.

        Parameters:
        video - Information about current ad video.
      • onVideoAdCompleted

         abstract Unit onVideoAdCompleted(VideoAd video)

        Called when the current video is completed.

        If more videos are present in the ad, onVideoAdStarted will be called next. Otherwise, onComplete will be invoked.

        Parameters:
        video - Information about the current ad video.
      • onVideoAdClicked

         abstract Unit onVideoAdClicked(VideoAd video)

        Called when the user clicks on the current video.

        Parameters:
        video - Information about the current ad video.
      • onVideoAdImpression

         abstract Unit onVideoAdImpression(VideoAd video)

        Called when an impression is recorded for the current video.

        Parameters:
        video - Information about the current ad video.
      • onVideoAdError

         abstract Unit onVideoAdError(VideoAd video, String error)

        Called when a non-fatal error occurs during the playback of the current video, such as attempting to skip before skipping is allowed.

        If this error occurs before onVideoAdStarted is called, some fields in VideoAd may be empty. This callback is for informational purposes only and does not affect playback.

        Parameters:
        video - Information about the current ad video.
        error - Description of the error.