Show Sidebar

Video Ad 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 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 Tag Name Instream Billboard video Native Video Interstitial Video Rewarded Video
1 player_container                                       Mandatory
2 progressbar Optional Optional Optional Default(circular) Default(circular)
3 resize_icon Default Default Default NA NA
4 skip_element Default NA NA Default NA
5 volume_icon NA Default Muted Default Muted Default Unmuted Default Unmuted
6 play_icon Default Optional Optional Default Default
7 progresscount Default Optional Optional Default Down Default Down

Tags and Additional attributes for controls

1) Player Container ViewGroup expected:FrameLayout
This is where the videoview would be added it can be tagged by using the constant
Tag: @string/vmax_video_ad_player_container

2)Progress Bar ViewType expected:ProgressBar
This will show the progress of the video
@string/vmax_video_progressbar

3) Video Resize Icon ViewType expected:Imageview
This will expand and cloapse the the video to full-screen view or normal view
@string/vmax_video_playback_icon

Additional attributes

android:background: Pass the collapse icon in this attribute
android:src: Pass the expand icon in this attribute

4) Video Skip element ViewType expected:TextView
This will expand and cloapse the the video to full-screen view or normal view
@string/vmax_video_skip_element

Additional attributes

android:contentDescription: Pass the text which would be shown when Ad is eligible to be skipped in this attribute
android:text: Pass the text which would be shown before skip-Ad text passed in the above attribute including the Macro ‘SKIP_COUNTER’ in the text is mandatory as this macro will be replaced by the skip counter text

5)Volume Icon ViewType expected:Imageview
This will mute or unmute the video
@string/vmax_video_volume_icon

Additional attributes

android:background: Pass the unmute icon in this attribute
android:src: Pass the mute icon in this attribute

6) Play Icon Viewtype expected:Imageview
This will un-mute the audio in the ad
Tag: @string/vmax_video_playback_icon

Additional attributes

android:background: Pass the play icon in this attribute
android:src: Pass the pause icon in this attribute

7) Ad Progress-count Viewtype expected:TextView
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 additional attributes
Tag: @string/vmax_video_progresscount

Additional attributes

For ascending progress
Pass @string/vmax_video_progresscount_up in the attribute android:contentDescription
For descending progress
Pass @string/vmax_video_progresscount_down in the attribute android:contentDescription

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