AdBreak
public protocol AdBreak
An AdBreak is an object that represents a collection of ads that are scheduled at a certain time.
-
An array of all the ads that are available in the current AdBreak.
Declaration
Swift
var ads: [Ad] { get } -
Indicates the duration of the ad break, in seconds.
Remark
- Ads are lazily loaded. This property becomes available when all ads are loaded.
- If the maximum duration is not set, it will return -1.
Declaration
Swift
var maxDuration: Int { get } -
Indicates the remaining duration of the ad break, in seconds.
Remark
- Ads are lazily loaded. This property becomes available when all ads are loaded.
- This feature is not available in the Google IMA integration and will default to -1.
Declaration
Swift
var maxRemainingDuration: Double { get } -
The time offset at which point the content will be paused to play the ad break, in seconds.
Declaration
Swift
var timeOffset: Int { get } -
The kind of the ad integration.
Remark
For possible values, seeAdIntegrationKindDeclaration
Swift
var integration: AdIntegrationKind { get } -
The type of custom ad integration.
Remark
Remark:
- Only available if
integrationequalsAdIntegrationKind.custom. - Custom ad integrations are registered using
Ads.registerServerSideIntegration.
Declaration
Swift
var customIntegration: String? { get }Return Value
The custom ad integration type.
- Only available if
-
The identifier of the ad break.
Remark
- For THEOads, this is the interstitial identifier.
- For Google IMA & DAI, this is the pod index of the ad break.
- For other integrations, this may be
nil.
Declaration
Swift
var id: String? { get } -
customDataDefault implementationAdditional integration-specific data associated with this ad break.
Remark
The value depends on the ad integration. It may benilif the integration does not provide any custom data.Default Implementation
Declaration
Swift
var customData: [String : Any]? { get }