AdItem
@objc(BMPAdItem)
@objcMembers
public class AdItem : NSObject
Represents an ad break which can be scheduled for playback.
-
The
AdSources that make up thisAdItem. The first ad source in this array is used as the main ad. Subsequent ad sources act as a fallback, meaning that if the main ad source does not provide a valid response, the subsequent ad sources will be utilized one after another.Declaration
Swift
public let sources: [AdSource] -
The playback position at which the ad break is scheduled to start. Will play as a pre-roll ad when set to
nil.Declaration
Swift
public let position: String? -
Creates a new
AdItemwith an array ofAdSources as pre-roll ads.Declaration
Swift
public convenience init(adSources sources: [AdSource])Parameters
sourcesThe
AdSources that make up thisAdItem. The first ad source in this array is used as the main ad. Subsequent ad sources act as a fallback, meaning that if the main ad source does not provide a valid response, the subsequent ad sources will be utilized one after another. -
Creates a new
AdItemwith an array ofAdSources scheduled for the given position.Declaration
Swift
public init(adSources sources: [AdSource], atPosition position: String?)Parameters
sourcesThe
AdSources that make up thisAdItem. The first ad source in this array is used as the main ad. Subsequent ad sources act as a fallback, meaning that if the main ad source does not provide a valid response, the subsequent ad sources will be utilized one after another.positionThe playback position at which the ad break is scheduled to start. Will play as a pre-roll ad when set to
nil. Value of position can be:
AdItem Class Reference