Skip to main content

Non Linear Ads

Non linear pause ads display an ad overlay inside the player when playback is paused. Configure pause ads under ads.nonLinear.pause.

Pause Ads​

AttributeTypeRequiredDescription
provider"generic"noProvider of the pause ad configuration.
genericobjectnoGeneric non linear pause ad configuration.
generic.urlstringnoURL for the VAST tag that includes non linear ads.
generic.xPosition"left" | "center" | "right"noHorizontal position of the non linear ad display area.
generic.yPosition"top" | "center" | "bottom"noVertical position of the non linear ad display area.
generic.backgroundOpacitynumbernoBackground opacity of the ad display area.
generic.slideAnimationobjectnoSlide animation configuration for the non linear ad.
generic.slideAnimation.enabledbooleannoWhether slide animation is enabled.
generic.slideAnimation.direction"left" | "right" | "up" | "down"noSlide animation direction.
generic.slideAnimation.durationnumbernoSlide animation duration in seconds.
generic.paddingobjectnoPadding around the non linear ad display area.
generic.padding.topstringnoTop padding in accepted CSS units.
generic.padding.bottomstringnoBottom padding in accepted CSS units.
generic.padding.leftstringnoLeft padding in accepted CSS units.
generic.padding.rightstringnoRight padding in accepted CSS units.
generic.rotationIntervalSecondsnumbernoInterval in seconds between pause ad rotation attempts while the player stays paused. When the displayed creative has been visible for this long, a new ad is requested from the VAST tag and the creative is replaced with a different eligible one. Defaults to 15; 0 disables rotation.
const config = {
...
ads: {
nonLinear: {
pause: {
provider: "generic",
generic: {
url: "VAST_AD_TAG_URL_WITH_NON_LINEAR_ADS",
xPosition: "right",
yPosition: "center",
backgroundOpacity: 0.6,
slideAnimation: {
enabled: true,
direction: "left",
duration: 0.6,
},
padding: {
right: "5%",
},
rotationIntervalSeconds: 30,
},
},
},
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

The cooldown between pause ad displays is controlled by ads.policy.pauseAdCooldown.