Ad Item
data class AdItem(val sources: Array<AdSource>, val position: String = "pre", val replaceContentDuration: Double = 0.0, val preloadOffset: Double = 0.0) : Parcelable
Represents an ad break which can be scheduled for playback.
One single AdItem can have multiple AdSources where all but the first act as fallback ad sources if the first one fails to load. The start and end of an ad break are signaled via PlayerEvent.AdBreakStarted and PlayerEvent.AdBreakFinished.
If the ad view group is removed or set the first time (e.g. by passing null
to Player.setAdViewGroup or by moving the hosting app to the background) after an IMA AdSource has been loaded, the according AdItem is discarded. The same holds true if the ad view group is removed or set during ad playback. This doesn't affect progressive AdSources.