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 | "ad" | "pod" | 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 | number | no | Snapback cooldown duration in seconds after an ad break completes. Set to 0 to disable the cooldown. |
| pauseAdCooldown | number | no | Cooldown duration in seconds between non linear pause ad displays. Set to 0 to disable the cooldown. |
const config = {
...
ads: {
policy: {
skipMode: "ad",
cooldown: 300,
pauseAdCooldown: 300
}
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);