Interface: SessionListener

OO.Pulse. SessionListener

The sessionListener passed to OO.Pulse.Session#startSession(sessionListener) must conform to this interface.
It receives messages informing of the proper time to start playing content and ads.

Methods are required unless marked as optional.

Methods


emptyAdBreak()

optional

When called, an ad break was discarded because it contained no playable ads.


firstQuartileReached()

optional

When called, the currently playing linear ad has reached 25% of its duration.


illegalOperationOccurred(message)

An unexpected call was made to the session.

Most likely protocol methods in OO.Pulse.Session or OO.Pulse.VideoAd were called when they were not expected.

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

Parameters:
Name Type Description
message string

A message describing the cause of the error.


midpointReached()

optional

When called, the currently playing linear ad has reached 50% of its duration.


sessionEnded()

The session is done; no more ads are played.


showPauseAd(pauseAd)

When called, a pause ad object to be displayed over the paused content will be provided.

Parameters:
Name Type Description
pauseAd OO.Pulse.PauseAd

Pause ad object. When displayed, call adDisplayed on the given pause ad object.


startAdBreak(adBreak)

When called, the SDK is about to provide some linear ads to play. This is a good time to prepare your user interface for video ad playback.

You are notified of each ad to display through timeout).

Parameters:
Name Type Description
adBreak OO.Pulse.AdBreak

An ad break object, detailing some information about the ad break and providing the ability to cancel it prematurely.


startAdPlayback(ad, timeout, adPosition)

Start playback of an ad, pausing content if it is playing.

Parameters:
Name Type Description
ad OO.Pulse.VideoAd

The ad which should be played.

timeout number

The time you have until the first frame of the ad should display.
If this was not possible, you are responsible for calling OO.Pulse.VideoAd#adFailed(error) with the error OO.PulseAdError.NO_SUPPORTED_MEDIA_FILE.

adPosition number

The position of this ad in the current ad break.


startContentPlayback()

Start/resume playback of the content.


thirdQuartileReached()

optional

When called, the currently playing linear ad has reached 75% of its duration.