-
Notifications
You must be signed in to change notification settings - Fork 6
Video Ad Integration
For the AdInline
to load video ads, you need to integrate the ad view as described in Integrating Inline Ad. The only thing that you need to change is setting property setBannerType(AdInline.BannerType.VIDEO)
.
adView = (AdInline) findViewById(R.id.custom_ad_view);
adView.setMasterTagId(12345);
adView.setBannerType(AdInline.BannerType.VIDEO);
Now the view is ready to load video banners. Just execute loadAd();
and banner will be loaded.
adView.loadAd();
Whole video ad set up can be found in SampleDemo app with its custom configuration settings.
Video ad has custom properties that defines some of the video view behavior.
To test how the video banner handles VAST type of content, you can enable debug mode, and provide the configuration directly to be rendered by the view. All you need to do is to set debug mode setDebugMode([true/false])
, and pass in debug content setDebugContent([VAST configuration content as String])
.
adView.setDebugMode(true);
adView.setDebugContent(Utils.isToString(getResources().openRawResource(R.raw.vast)));
For more information, try looking at SampleDemo.
By default, when video is loaded and started, video is muted. To edit this behavior you can use setVideoMuteOnInit([true/false])
.
adInline.setVideoMuteOnInit(true);
By default, video banner will close after its finished playing content. To edit this behavior you can use setVideoCloseOnComplete(true/false)
.
adInline.setVideoCloseOnComplete(true);
By default, close button is always hidden when video ad is displayed. This property can be changed by defining property type in setVideoCloseButtonShowBehavior(VideoSettings.CloseButtonShowBehavior.[ALWAYS/AFTER_COMPLETE/HIDE])
.
adInline.setVideoCloseButtonShowBehavior(VideoSettings.CloseButtonShowBehavior.ALWAYS);
adInline.setVideoCloseButtonShowBehavior(VideoSettings.CloseButtonShowBehavior.AFTER_COMPLETE);
adInline.setVideoCloseButtonShowBehavior(VideoSettings.CloseButtonShowBehavior.HIDE);
Video player also has different skin types that can be set by using setVideoPlayerSkinType(AdformEnum.VideoPlayerSkinType.[DEFAULT/MINIMAL])
.
adInline.setVideoPlayerSkinType(AdformEnum.VideoPlayerSkinType.DEFAULT);
adInline.setVideoPlayerSkinType(AdformEnum.VideoPlayerSkinType.MINIMAL);
In order to set up video ads fallback, you need to set fallback master tag of other HTML ad.
adInline.setFallbackMasterTagId(123456);
Basic integrations
- Integrating Inline Ad
- Integrating Full Screen Overlay Ad
- Integrating Interstitial Ad
- Integrating Adhesion Ad
- Video Ad Integration
Advanced integrations
- Advanced integration of Inline Ad
- Advanced integration of Full Screen Overlay Ad
- Advanced integration of Interstitial Ad
- Advanced integration of Adhesion Ad
- Advanced integration of AdInline ListView
- Advanced integration of AdInline RecyclerView
- Instream video ads integration
Other
- Adding Custom Values
- Adding Keywords
- Adding Key Value Pairs
- Adding Search Words
- Location
- Security
- Ad Tags
- Header Bidding
- Changing ADX domain
- Specifying banner loading behaviour
- GDPR
- Logs
Mediation adapters
Plugins