Interface PulseSessionListener
- 
public interface PulseSessionListenerThis interface is used by aPulseSessionto 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 voidgetAllLinearAds(java.util.List<PulseVideoAd> pulseVideoAdList)default voidgetStaggeringValues(ResponseHeader responseHeader)Called when a Pulse ad response returns, giving access to supported staggering HTTP headers.voidillegalOperationOccurred(Error error)An illegal operation has occurred.default voidpreloadNextAd(PulseVideoAd ad)when called, you should start preloading the given ad.voidsessionEnded()The session has ended.voidshowPauseAd(PulsePauseAd ad)When called, you should display the provided pause ad.voidstartAdBreak(PulseAdBreak adBreak)When called you should pause playback of the content (if it was playing), and prepare your user interface for video ad playback.voidstartAdPlayback(PulseVideoAd ad, float timeout)When called you should start playback of the given ad.voidstartContentPlayback()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- ThePulseVideoAdto 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- ThePulseVideoAdto 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.
 
- 
getStaggeringValues
default void getStaggeringValues(ResponseHeader responseHeader)
Called when a Pulse ad response returns, giving access to supported staggering HTTP headers.- Parameters:
 responseHeader- Contains supported Pulse staggering response headers.
 
- 
illegalOperationOccurred
void illegalOperationOccurred(Error error)
An illegal operation has occurred.Most likely interface methods in
PulseSessionorPulseVideoAdwere 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.
 
 - 
 
 -