Ad Experience Controls

Prebid SDK provides an API way to customize its behaviour.

NOTE: Planned future enhancements will support Server Side Configuration. Follow this feature request for the details.

Rendering Controls

The following properties enable rendering customization of Video Interstitial Ads.

Max Video Duration

This control sets the maximum available video duration in seconds. Prebid SDK sends the value of this property in the imp.video.maxduration object of the bid request. If the value in the received VAST tag <Duration> is larger than the given number the SDK will not load the media file, the ad load will fail and an error message will be generated.

API Object InterstitialAdUnit, RewardedAdUnit,
MediationInterstitialAdUnit, MediationRewardedVideoAdUnit
Ad Unit Property adUnit.setMaxVideoDuration(seconds)
Server Property maxvideoduration (pending for PBS implementation)
Default Value 3600 seconds

Application Muted

This control enables playback to toggle sound on or off.

API Object InterstitialAdUnit, RewardedAdUnit,
MediationInterstitialAdUnit, MediationRewardedVideoAdUnit
Ad Unit Property adUnit.setIsMuted(true)
Server Property ismuted (pending for PBS implementation)
Default Value false

Close Button Area

This control sets the percent of device screen which the close button should occupy.

API Object InterstitialAdUnit, RewardedAdUnit,
MediationInterstitialAdUnit, MediationRewardedVideoAdUnit
Ad Unit Property adUnit.setCloseButtonArea(factor)
Server Property closebuttonarea (pending for PBS implementation)
Allowed Values 0..1
Default Size 70dp

Customization Example

Default Custom
Close Button Area - Default Close Button Area - Custom

Close Button Position

This control sets the position of the close button on the screen.

API Object InterstitialAdUnit, RewardedAdUnit,
MediationInterstitialAdUnit, MediationRewardedVideoAdUnit
 
Ad Unit Property adUnit.setCloseButtonPosition(Position.TOP_LEFT)
Server Property closebuttonposition (pending for PBS implementation)
Allowed Values Position.TOP_LEFT, Position.TOP_RIGHT
Default Value Position.TOP_RIGHT

Customization Example

Default Custom
Close Button Position - Default Close Button Position - Custom

Skip Button Area

This control sets the percent of device screen which the skip button should occupy.

API Object InterstitialAdUnit, RewardedAdUnit,
MediationInterstitialAdUnit, MediationRewardedVideoAdUnit
 
Ad Unit Property adUnit.setSkipButtonArea(factor)
Server Property skipbuttonarea (pending for PBS implementation)
Allowed Values 0..1
Default Value 70dp

Customization Example

Default Custom
Close Button Position - Default Close Button Position - Custom

Skip Button Position

This control sets the position of the skip button on the screen.

API Object InterstitialAdUnit, RewardedAdUnit,
MediationInterstitialAdUnit, MediationRewardedVideoAdUnit
 
Ad Unit Property adUnit.setSkipButtonPosition(Position.TOP_LEFT)
Server Property skipbuttonposition (pending for PBS implementation)
Allowed Values Position.TOP_LEFT, Position.TOP_RIGHT
Default Value Position.TOP_RIGHT

Customization Example

Default Custom
Close Button Position - Default Close Button Position - Custom

Sound Button

This control toggles the display of the sound/mute button to users.

API Object InterstitialAdUnit, RewardedAdUnit,
MediationInterstitialAdUnit, MediationRewardedVideoAdUnit
 
Ad Unit Property adUnit.setIsSoundButtonVisible(true)
Server Property not supported
Default Value false

Customization Example

Custom
Close Button Area - Default

Skip Delay

This control sets number of seconds which should be passed from the start of playback until the skip or close button should be shown.

API Object InterstitialAdUnit, RewardedAdUnit,
MediationInterstitialAdUnit, MediationRewardedVideoAdUnit
 
Ad Unit Property adUnit.setSkipDelay(seconds)
Server Property skipdelay (pending for PBS implementation)
Default Value 10 seconds

Customization examples

The code sample:

adUnit = MediationInterstitialAdUnit(
    activity,
    configId,
    EnumSet.of(AdUnitFormat.DISPLAY),
    mediationUtils
)

adUnit?.setMaxVideoDuration(30)
adUnit?.setCloseButtonArea(0.1)
adUnit?.setSkipDelay(5)
adUnit?.setSkipButtonArea(0.1)
adUnit?.setSkipButtonPosition(Position.TOP_RIGHT)
adUnit?.setCloseButtonPosition(Position.TOP_LEFT)