Prebid SDK provides an API way to customize its behaviour.
NOTE: In the nearest future the Server Side Configuration will be supported as well. Follow this feature request for the details.
The following properties allow to customize the rendering of Video Interstitial Ads.
The videoParameters.maxDuration
indicates the maximum available playback time in seconds.
If the value in the Duration tag is bigger than the given value SDK will fail to load ad, providing a respective error message.
The isMuted
property indicates whether the ad should run playback with sound or not.
Default value - false.
The closeButtonArea
property indicates the percent of device screen which the close button should occupy. The possible values are from 0 to 1.
The closeButtonPosition
property indicates the position of the close button on the screen. The possible values are TopLeft and TopRight. The default value is TopRight.
The example:
The skipButtonArea
property indicates the percent of device screen which the skip button should occupy. The possible values are from 0 to 1.
The skipButtonPosition
property indicates the position of the close button on the screen. The possible values are TopLeft and TopRight. The default value is TopLeft.
The example:
The skipDelay
property indicates the number of seconds which should be passed from the start of playback until the skip or close button should be shown. The default value is 10.
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