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. |
val luraConfiguration = LuraConfiguration(
ads = LuraAdsConfiguration(
policy = LuraAdsPolicyConfiguration(
skipMode = LuraAdsSkipMode.AD,
cooldown = 300,
pauseAdCooldown = 300
)
)
)
playerView = findViewById(R.id.lura_player_view)
player = LuraPlayer(context = this, playerView = playerView)
player.setConfig(luraConfiguration)