BMPAdBreak

Objective-C

@protocol BMPAdBreak <BMPAdConfig, _BMPJsonEncodable>

Swift

protocol AdBreak : AdConfig

Contains information about an ad break.

  • The identifier of the corresponding AdBreakConfig. If the AdBreak was generated out of a VMAP tag, then the ID present in the VMAP tag will be taken. If none is present in the VMAP tag, it will be generated.

    See

    BMPAdBreakConfig

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull identifier;

    Swift

    var identifier: String { get }

    Return Value

    The identifier of the corresponding AdBreakConfig.

  • The time in seconds in the media timeline the AdBreak is scheduled for.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSTimeInterval scheduleTime;

    Swift

    var scheduleTime: TimeInterval { get }

    Return Value

    The time in seconds in the media timeline the AdBreak is scheduled for.

  • ads

    The ads scheduled for this AdBreak.

    See

    BMPAd

    Note

    This contains only ads that have already been started. Therefore, it is expected to be empty when AdBreakStartedEvent is seen.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<id<BMPAd>> *_Nonnull ads;

    Swift

    var ads: [any Ad] { get }

    Return Value

    The ads scheduled for this AdBreak.

  • Total number of ads in the ad break.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSUInteger totalNumberOfAds;

    Swift

    var totalNumberOfAds: UInt { get }

    Return Value

    The total number of ads in the AdBreak.

  • Adds an AdItem to the ads Array

    Declaration

    Objective-C

    - (void)registerAd:(nonnull id<BMPAd>)adItem;

    Swift

    func register(_ adItem: any Ad)