AdsManager

public interface AdsManager implements BaseManager

An object which handles playing ads after they've been received from the server. After the AdsManager is retrieved from an AdsManagerLoadedEvent, init should be called first. After the LOADED event is fired, start can be called. At any time, destroy can be called to end ad playback.

Public Method Summary

abstract void
discardAdBreak()
Discards current ad break and resumes content.
abstract List<Float>
getAdCuePoints()
List of content time offsets in seconds at which ad breaks are scheduled.
abstract void
pause()
Pauses the current ad.
abstract void
requestNextAdBreak()
This method is deprecated. This API will be removed in a future release. Afterwards, ads will automatically be fetched 4 seconds before ad break time.

Request ad break for the next content segment. Used to manually request VMAP and ad rules breaks when getAutoPlayAdBreaks is false.

Media file will be preloaded if getEnablePreloading is true, otherwise only ads will be prefetched.

abstract void
resume()
Resumes the current ad.
abstract void
skip()
Skips the current ad.
abstract void
start()
Starts playing the ads.

Inherited Method Summary

Public Methods

public abstract void discardAdBreak ()

Discards current ad break and resumes content. If there is no current ad then the next ad break is discarded.

public abstract List<Float> getAdCuePoints ()

List of content time offsets in seconds at which ad breaks are scheduled. The list will be empty if no ad breaks are scheduled.

public abstract void pause ()

Pauses the current ad.

public abstract void requestNextAdBreak ()

This method is deprecated.
This API will be removed in a future release. Afterwards, ads will automatically be fetched 4 seconds before ad break time.

Request ad break for the next content segment. Used to manually request VMAP and ad rules breaks when getAutoPlayAdBreaks is false.

Media file will be preloaded if getEnablePreloading is true, otherwise only ads will be prefetched.

public abstract void resume ()

Resumes the current ad.

public abstract void skip ()

Skips the current ad. AdsManager.skip() only skips ads if IMA does not render the 'Skip ad' button.

public abstract void start ()

Starts playing the ads. This will be ignored for ads lists, because BaseManager.init() will start playback.