If you use Prebid SDK to render the winning bid you can customize behaviour using the following API.
NOTE: Planned future enhancements will support Server Side Configuration. Follow this feature request for the details.
The following properties enable rendering customization of Video Interstitial Ads.
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 | InterstitialRenderingAdUnit , RewardedAdUnit , MediationInterstitialAdUnit , MediationRewardedAdUnit |
Ad Unit Property | adUnit.videoParameters.maxDuration |
Server Property | maxvideoduration (pending for PBS implementation) |
Default Value | 3600 seconds |
This control enables playback to toggle sound on or off.
API Object | InterstitialRenderingAdUnit , RewardedAdUnit , MediationInterstitialAdUnit , MediationRewardedAdUnit |
Ad Unit Property | adUnit.isMuted |
Server Property | ismuted (pending for PBS implementation) |
Default Value | false |
This control sets the percent of device screen which the close button should occupy.
API Object | InterstitialRenderingAdUnit , RewardedAdUnit , MediationInterstitialAdUnit , MediationRewardedAdUnit |
Ad Unit Property | adUnit.closeButtonArea |
Server Property | closebuttonarea (pending for PBS implementation) |
Allowed Values | 0..1 |
Default Value | 0.1 |
Customization Example
Default | Custom |
This control sets the position of the close button on the screen.
API Object | InterstitialRenderingAdUnit , RewardedAdUnit , MediationInterstitialAdUnit , MediationRewardedAdUnit |
Ad Unit Property | adUnit.closeButtonPosition |
Server Property | closebuttonposition (pending for PBS implementation) |
Allowed Values | topLeft, topRight |
Default Value | topRight |
Customization Example
Default | Custom |
This control sets the percent of device screen which the skip button should occupy.
API Object | InterstitialRenderingAdUnit , RewardedAdUnit , MediationInterstitialAdUnit , MediationRewardedAdUnit |
Ad Unit Property | adUnit.skipButtonArea |
Server Property | skipbuttonarea (pending for PBS implementation) |
Allowed Values | 0..1 |
Default Value | 0.1 |
This control sets the position of the skip button on the screen.
API Object | InterstitialRenderingAdUnit , RewardedAdUnit , MediationInterstitialAdUnit , MediationRewardedAdUnit |
Ad Unit Property | adUnit. skipButtonPosition |
Server Property | skipbuttonposition (pending for PBS implementation) |
Allowed Values | topLeft, topRight |
Default Value | topLeft |
Customization Example
Default | Custom |
This control sets the number of seconds which should be passed from the start of playback until the skip or close button should be shown.
API Object | InterstitialRenderingAdUnit , RewardedAdUnit , MediationInterstitialAdUnit , MediationRewardedAdUnit |
Ad Unit Property | adUnit.skipDelay |
Server Property | skipdelay (pending for PBS implementation) |
Default Value | 10 seconds |
isSoundButtonVisible
This control toggles the display of the sound/mute button to users.
API Object | InterstitialRenderingAdUnit , RewardedAdUnit , MediationInterstitialAdUnit , MediationRewardedAdUnit |
Ad Unit Property | adUnit.isSoundButtonVisible |
Server Property | not supported |
Default Value | false |
Customization Example
Default | Custom |
The code sample:
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