Interface PulseSessionListener
-
public interface PulseSessionListener
This interface is used by aPulseSession
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 Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
getAllLinearAds(java.util.List<PulseVideoAd> pulseVideoAdList)
void
illegalOperationOccurred(Error error)
An illegal operation has occurred.default void
preloadNextAd(PulseVideoAd ad)
when called, you should start preloading the given ad.void
sessionEnded()
The session has ended.void
showPauseAd(PulsePauseAd ad)
When called, you should display the provided pause ad.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.void
startAdPlayback(PulseVideoAd ad, float timeout)
When called you should start playback of the given ad.void
startContentPlayback()
When called you should start (or resume) playback of the content.
-
-
-
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.
-
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)
orOmidAdSession.createOmidAdSession(PulseVideoAd, Context, View, String)
just before playing ad content.You are responsible for notifying the ad when certain events have occurred.
- Parameters:
ad
- ThePulseVideoAd
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 callingPulseVideoAd.adFailed(PulseAdError)
withPulseAdError.REQUEST_TIMED_OUT
.
-
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
- ThePulseVideoAd
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
orPulseVideoAd
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.
-
-