Interface PulseSessionListener


public interface PulseSessionListener
This interface is used by a PulseSession to communicate with your application. It will inform your application of the proper time to perform certain actions, or when some events have occurred.
  • Method Details

    • startContentPlayback

      void startContentPlayback()
      When called you should start (or resume) playback of the content.
    • startAdBreak

      void startAdBreak(PulseAdBreak adBreak)
      When called you should pause playback of the content (if it was playing), and prepare your user interface for video ad playback.

      You will be notified of each ad to display through startAdPlayback(PulseVideoAd, float).

      Parameters:
      adBreak - An object detailing some information about the ad break and providing the ability to cancel it prematurely.
    • startAdPlayback

      void startAdPlayback(PulseVideoAd ad, float timeout)
      When called you should start playback of the given ad.

      If you want to use Open Measurement SDK (OM SDK) for publishing ad events to measurement providers, you must call OmidAdSession.createOmidAdSession(PulseVideoAd, Context, View, String, List) or OmidAdSession.createOmidAdSession(PulseVideoAd, Context, View, String) just before playing ad content.

      You are responsible for notifying the ad when certain events have occurred.

      Parameters:
      ad - The PulseVideoAd to be displayed.
      timeout - The time you have until the first frame of the ad has displayed. If this was not possible, you are responsible for calling PulseVideoAd.adFailed(PulseAdError) with PulseAdError.REQUEST_TIMED_OUT.
    • preloadNextAd

      default void preloadNextAd(PulseVideoAd ad)
      when called, you should start preloading the given ad.
      Parameters:
      ad - The PulseVideoAd to be displayed next.
    • showPauseAd

      void showPauseAd(PulsePauseAd ad)
      When called, you should display the provided pause ad.

      You are responsible for notifying the ad when certain events have occurred.

      Parameters:
      ad - The PulsePauseAd to be displayed.
    • sessionEnded

      void sessionEnded()
      The session has ended.

      No further listener methods will be called.

    • illegalOperationOccurred

      void illegalOperationOccurred(Error error)
      An illegal operation has occurred.

      Most likely interface methods in PulseSession or PulseVideoAd were called when they were not expected.

      One way to recover from this would be to stop the current session, and continue playing the content.

      Parameters:
      error - The error that occurred.