Show Sidebar

Instream Video Ads Customization

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.

Publisher App can notify the SDK about the positions of the video controls in the layout. Follow the steps mentioned in this document if you want to override the behavior of the default controls and customize the video controls for instream video ads. You can specify the position of the controls by using android:tag attribute all such possible tags are mentioned below. In most cases, you will not need any customizations and you can stick to the defaults.

Sr No Tag Name Instream
1 player_container Mandatory
2 progresscount_up Optional
3 progresscount_down Default
4 progressbar Default(Horizontal)
5 cta Default
6 expand_icon Default
7 collapse_icon Default
8 skip_after_counter Default
9 skip_after_counter_label Default
10 skip_text Default
11 skip_icon Default
12 replay_icon NA
13 mute_icon Optional
14 unmute_icon Optional
15 play_icon Default
16 ad_badge Default

Tags for controls

1)Player Container
This is where the videoview would be added it can be tagged by using the constant

Ad Progresscount
This Text would show the numerical progress of the ad. You can customize the progress count to have ascending or descending progress by making use of the below tags
2)For ascending progress

3)For descending progress

4)Ad Progress-bar
This will indicate the progress of the video

5)CTA text
This is where click to action would be linked

6)Expand Icon
This would expand the video to fullscreen

7)Collapse Icon
This would collapse the video from fullscreen

8)Ad Skip After counter
This will indicate the time left for the skip button to appear

9)Ad Skip After counter label
This text will appear before the skip skip counter

10)Ad Skip Text
This Text would be shown on the skip button

11)Ad Skip Icon
This icon will be shown alongside skip text on the skip Ad button

12)Replay Icon
This would be shown at the end of the video and would provide an option to replay the video

13)Mute Icon
This will mute the audio in the ad

14)Un-Mute Icon
This will un-mute the audio in the ad

15)Play Icon
This will un-mute the audio in the ad

16)Ad Badge
This is to differntiate ad from content

1) XML Approach

a) Create Layout for controls

Vmax SDK takes a layout resource file an input for rendering controls, the layout file which is passed should contain all the video controls as well as the player container along with appropriate tags, an example of such a layout can be seen below.

b) Pass the layout to VmaxAdview

You will have to pass the controls layout to the VmaxAdView viewgroup that you have added in your Activity/fragment’s layout

2) Programmatic Approach

a) Follow step a) from XML Approach

b) Pass the layout to VmaxAdview
You can pass the custom controls layout to VmaxAdView object programmatically through the below API