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 Detail

      • 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.
      • getAllLinearAds

        default void getAllLinearAds​(java.util.List<PulseVideoAd> pulseVideoAdList)
      • 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.