AdItem
@objc(BMPAdItem)
@objcMembers
public class AdItem : NSObject
Represents an ad break which can be scheduled for playback.
-
The
AdSource
s 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
AdItem
with an array ofAdSource
s as pre-roll ads.Declaration
Swift
public convenience init(adSources sources: [AdSource])
Parameters
sources
The
AdSource
s 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
AdItem
with an array ofAdSource
s scheduled for the given position.Declaration
Swift
public init(adSources sources: [AdSource], atPosition position: String?)
Parameters
sources
The
AdSource
s 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.position
The 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: