![]() |
VOOZH | about |
If you use Prebid SDK to render the winning bid you can customize behaviour using the following API.
The following properties enable rendering customization of Video Interstitial Ads.
This setting determines the longest video duration allowed, measured in seconds. When using the Prebid SDK, this value is sent in the imp.video.maxduration object of the bid request. If the <Duration> in the VAST tag received is longer than this set maximum, the SDK won’t load the video file, the ad won’t load, and an error message will appear.
{: .table .table-bordered .table-striped }
|**API Object** | `InterstitialAdUnit`, `RewardedAdUnit`, <br />`MediationInterstitialAdUnit`, `MediationRewardedVideoAdUnit` |
|**Ad Unit Property** | `adUnit.setMaxVideoDuration(seconds)`|
|**Server Property** | `maxvideoduration` |
|**Default Value** | `3600 seconds`|
{: .table .table-bordered .table-striped }
|**API Object** |`InterstitialRenderingAdUnit`, `RewardedAdUnit`, <br />`MediationInterstitialAdUnit`, `MediationRewardedAdUnit` |
|**Ad Unit Property** | `adUnit.videoParameters.maxDuration`|
|**Server Property** | `maxvideoduration` |
|**Default Value** | `3600 seconds`|
This option lets you switch the sound on or off during playback.
{: .table .table-bordered .table-striped }
|**API Object** | `InterstitialAdUnit`, `RewardedAdUnit`, <br />`MediationInterstitialAdUnit`, `MediationRewardedVideoAdUnit` |
|**Ad Unit Property** | `adUnit.setIsMuted(true)`|
|**Server Property** | `ismuted` |
|**Default Value** | `false`|
{: .table .table-bordered .table-striped }
|**API Object** |`InterstitialRenderingAdUnit`, `RewardedAdUnit`, <br />`MediationInterstitialAdUnit`, `MediationRewardedAdUnit` |
|**Ad Unit Property** | `adUnit.isMuted`|
|**Server Property** | `ismuted` |
|**Default Value** | `false`|
This setting determines the percentage of the device screen that the close button should cover.
This setting controls where the close button appears on the screen.
This setting determines the percentage of the device screen that the skip button should cover.
Customization Example
| Default | Custom |
| 👁 Close Button Position - Default |
👁 Close Button Position - Custom |
This control sets the position of the skip button.
This setting determines the number of seconds after the start of playback before the skip or close button should appear.
{: .table .table-bordered .table-striped }
|**API Object** |`InterstitialAdUnit`, `RewardedAdUnit`, <br />`MediationInterstitialAdUnit`, `MediationRewardedVideoAdUnit` |
|**Ad Unit Property** | `adUnit.setSkipDelay(seconds)`|
|**Server Property** | `skipdelay` |
|**Default Value** | `10 seconds`|
{: .table .table-bordered .table-striped }
|**API Object** |`InterstitialRenderingAdUnit`, `RewardedAdUnit`, <br />`MediationInterstitialAdUnit`, `MediationRewardedAdUnit` |
|**Ad Unit Property** | `adUnit.skipDelay`|
|**Server Property** | `skipdelay` |
|**Default Value** | `10 seconds`|
This option switches on or off the visibility of the sound/mute button for users.
Here is how you can implement all the API’s to customize your ad.
```kotlin
adUnit = MediationInterstitialAdUnit(
activity,
configId,
EnumSet.of(AdUnitFormat.BANNER),
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)
```
```swift
interstitialController = InterstitialRenderingAdUnit(configID: prebidConfigId,
minSizePercentage: CGSize(width: 30, height: 30))
interstitialController?.delegate = self
interstitialController?.videoParameters.maxDuration = SingleContainerInt(integerLiteral: 30)
interstitialController?.closeButtonArea = 0.1
interstitialController?.skipDelay = 5
interstitialController?.skipButtonArea = 0.1
interstitialController?.skipButtonPosition = .topRight
interstitialController?.closeButtonPosition = .topRight
```