Interface: AdBreak

OO.Pulse. AdBreak

This is the interface for ad breaks owned by an OO.Pulse.Session.

An ad break is a collection of ads that are to be displayed in sequence.

This interface is used to request information regarding the ad break, or to forcefully stop the ad break. The returned information is only valid until a new ad break starts playing.

Methods


getBreakPosition()

Get the position of the ad break.

Returns:

The position of the ad break.

Type
OO.Pulse.AdBreakPosition

getPlayableAdsRemaining()

Get the number of playable ads remaining in this ad break.

Returns:

The number of ads remaining.

Type
number

getPlayableAdsTotal()

Get the total number of playable ads in this ad break.

Returns:

The total number of playable ads.

Type
number

stopAdBreak()

Forcefully stop the ad break.

This may be called at any time while the ad break is active.

After the ad break is stopped, the session continues with a call to one of the following:

Type Definitions


defer()

Provided when AD_BREAK_STARTING and AD_BREAK_ENDING fire, used to prevent the ad break from starting playback automatically, or to prevent the content playback from starting automatically when the break is finished.

Returns:

A function which, when called, starts or finishes the ad break, respectively.

Type
OO.Pulse.AdBreak~startBreak

startBreak()

Returned by OO.Pulse.AdBreak~defer, used to start or finish playback for the previously deferred ad break.