Interface PulseSessionListener
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 Summary
Modifier and TypeMethodDescriptionvoid
illegalOperationOccurred
(Error error) An illegal operation has occurred.default void
when called, you should start preloading the given ad.void
The session has ended.void
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
When called you should start (or resume) playback of the content.
-
Method Details
-
startContentPlayback
void startContentPlayback()When called you should start (or resume) playback of the content. -
startAdBreak
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
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
.
-
preloadNextAd
when called, you should start preloading the given ad.- Parameters:
ad
- ThePulseVideoAd
to be displayed next.
-
showPauseAd
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
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.
-