BaseManager

public interface BaseManager implements AdProgressProvider
Known Indirect Subclasses

Base interface for managing ads. Subclassed by AdsManager for directly requested ads and StreamManager for dynamic ad insertion streams.

Public Method Summary

abstract void
addAdErrorListener(AdErrorEvent.AdErrorListener errorListener)
Registers a listener for errors that occur during the ad or stream initialization and playback.
abstract void
addAdEventListener(AdEvent.AdEventListener adEventListener)
Registers a listener for ad events that occur during ad or stream initialization and playback.
abstract void
destroy()
Stops the ad and all tracking, then releases all assets that were loaded to play the ad.
abstract void
focus()
Generic focus endpoint that puts focus on the skip button if present.
abstract AdProgressInfo
getAdProgressInfo()
Returns the latest AdProgressInfo for the current playing ad.
abstract Ad
getCurrentAd()
Get currently playing ad.
abstract void
init(AdsRenderingSettings settings)
Initializes the ad experience on the manager.
abstract void
init()
Initializes the ad experience using default rendering settings.
abstract boolean
isCustomPlaybackUsed()
This method is deprecated. This API will be removed as we move towards requiring custom playback at all times.
abstract void
removeAdErrorListener(AdErrorEvent.AdErrorListener errorListener)
Removes a listener for error events.
abstract void
removeAdEventListener(AdEvent.AdEventListener adEventListener)
Removes a listener for ad events.

Inherited Method Summary

Public Methods

public abstract void addAdErrorListener (AdErrorEvent.AdErrorListener errorListener)

Registers a listener for errors that occur during the ad or stream initialization and playback.

Parameters
errorListener

public abstract void addAdEventListener (AdEvent.AdEventListener adEventListener)

Registers a listener for ad events that occur during ad or stream initialization and playback.

Parameters
adEventListener

public abstract void destroy ()

Stops the ad and all tracking, then releases all assets that were loaded to play the ad.

public abstract void focus ()

Generic focus endpoint that puts focus on the skip button if present. If not present, focus is put on interactive elements, including icons or interactive creatives.

public abstract AdProgressInfo getAdProgressInfo ()

Returns the latest AdProgressInfo for the current playing ad. Ad progress info will be available after AD_PROGRESS is broadcast and only between AD_BREAK_STARTED and AD_BREAK_ENDED. When unavailable this will return null.

public abstract Ad getCurrentAd ()

Get currently playing ad.

public abstract void init (AdsRenderingSettings settings)

Initializes the ad experience on the manager. This will load an ad and eventually send the AdEvent.AdEventType.LOADED event, indicating the ad is ready to be started. If an ads list is loaded, this method will start playback.

Parameters
settings

public abstract void init ()

Initializes the ad experience using default rendering settings.

public abstract boolean isCustomPlaybackUsed ()

This method is deprecated.
This API will be removed as we move towards requiring custom playback at all times.

Lets publisher query whether publisher's player is going to be used for rendering.

Returns

public abstract void removeAdErrorListener (AdErrorEvent.AdErrorListener errorListener)

Removes a listener for error events.

Parameters
errorListener

public abstract void removeAdEventListener (AdEvent.AdEventListener adEventListener)

Removes a listener for ad events.

Parameters
adEventListener