Show Sidebar

Video Ad Elements Customizaton

Rất tiếc, mục này chỉ tồn tại ở English. For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language.

You can customize the media controls/video elements for video ads by passing layout files through the API setLayout(int portraitLayoutId, int landscapeLayoutId) on VmaxAdView object. Layouts for media controls to be displayed in portrait mode and in landscape mode have to be passed using different layout files if it’s different. Follow the below-mentioned steps to do the same. The same layout can also be passed in both portrait and landscape if it’s same.

 picture1picture2picture3

Video elements with tags

1 Mute/Un-mute icon

This will mute or un-mute the video

To display this use the tag  @string/vmax_video_volume_icon

Eg.

Pass drawables for for mute and unmute icons in the attributes android:background and  android:src respectively

 

2,8,9 Skip element,Close ad text ,close icon

This will display skip counter(if ad is having skip duration set), close ad text and close icon whichever is tagged as per your needs.

To display this use the tag  @string/vmax_video_skip_element . Note that SKIP_COUNTER is a client side macro which will get replaced with actual skip down counter. You can position the macro as per you needs.

Eg.

Pass drawable for for close icon in the attribute android:drawableRight , pass skip counter  text in the attribute android:text and pass close ad text in the attribute android:contentDescription

3 Video Container

This is where the video view would be shown

To display this use the tag  @string/vmax_video_player_container

Eg.

4 Play Pause icon

This will play or pause the video

To display this use the tag  @string/vmax_video_playback_icon

Eg.

Pass drawables for for play and pause icons in the attributes android:background and  android:src respectively

5 Ad-badge

This is to indicate that the displayed content is an Ad

Eg.

 

6 Numerical progress

This will indicate progress of the video ad

To display this use the tag  @string/vmax_video_progresscount

Eg.

 

Pass values @string/vmax_video_progresscount_up or @string/vmax_video_progresscount_down in android:contentDescription tag to indicate if the numerical progress should ascend or descend

7 Progress Bar

This will show progress of  the video

To display this use the tag  @string/vmax_video_progressbar

Eg.

 

10 CTA Button

This will display the Call To Action Button

To display this use the tag  @string/vmax_video_cta

Eg.

 

Pass drawables for for mute and unmute icons in the attributes android:background and  android:src respectively

 

Example  portrait and landscape layouts for passing in  setLayout() API

Portrait Layout

 

Landscape layout

 

 

Pass Layouts to VMAX SDK

You can pass the layouts to Vmax SDK using the setLayout() API as mentioned below ,this API needs to be called before you call the showAd() API