Show Sidebar

Instream Video Ads Customization

Maaf, entri ini hanya tersedia dalam bahasa 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
@string/vmax_video_ad_player_container

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
@string/vmax_video_ad_progresscount_up

3)For descending progress
@string/vmax_video_ad_progresscount_down

4)Ad Progress-bar
This will indicate the progress of the video
@string/vmax_video_ad_progressbar

5)CTA text
This is where click to action would be linked
@string/vmax_video_ad_cta

6)Expand Icon
This would expand the video to fullscreen
@string/@string/vmax_video_ad_fullscreen_icon

7)Collapse Icon
This would collapse the video from fullscreen
@string/@string/vmax_video_ad_smallscreen_icon

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

9)Ad Skip After counter label
This text will appear before the skip skip counter
@string/vmax_video_ad_skip_after_counter_label

10)Ad Skip Text
This Text would be shown on the skip button
@string/vmax_video_ad_skip_text

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

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

13)Mute Icon
This will mute the audio in the ad
@string/vmax_video_ad_mute_icon

14)Un-Mute Icon
This will un-mute the audio in the ad
@string/vmax_video_ad_unmute_icon

15)Play Icon
This will un-mute the audio in the ad
@string/vmax_video_ad_unmute_icon

16)Ad Badge
This is to differntiate ad from content
@string/vmax_video_ad_progress_label

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