Ad Policy
Ad policy controls ad skipping and ad cooldown behavior. It is configured under ads.policy, independently from ads.clientSide and ads.serverSide, so the same policy applies whether playback uses client-side ads (CSAI) or server-side ads (SSAI).
| Attribute | Type | Required | Description |
|---|---|---|---|
skipMode | LuraAdsSkipMode | no | Skip mode of the ads, .ad will skip a single ad wherever possible, .pod will skip the whole pod wherever possible. (Defaults to pod) |
cooldown | Int | no | Snapback cooldown duration in seconds after an ad break completes. Set to 0 to disable the cooldown. |
pauseAdCooldown | Int | no | Cooldown duration in seconds between non linear pause ad displays. Set to 0 to disable the cooldown. |
let config = LuraPlayerConfiguration(
ads: .init(
policy: .init(
skipMode: .ad,
cooldown: 300,
pauseAdCooldown: 300
)
)
)
player?.setConfig(config)