Customize video player options on Android

ANVideoPlayerSettings class allows publisher app to customize some of the Ad Video Player UI/Controls.


The customization is applied to all of the Video ads served through Xandr SDK both Instream and Banner Video(Outstream).

Function Default Setting Description
void shouldShowClickThroughControl
(boolean showClickThroughControl)
true Determines whether the ClickThrough Control is displayed. Setting it to false makes the entire video clickable
void setClickThroughText
(string clickThroughText)
"Learn More" Customizes the text associated with the ClickThrough Control
void shouldShowFullScreenControl
(boolean showFullScreenControl) (Banner Video Only)
true Controls the visibility of the fullscreen button for Banner Video
void shouldShowTopBar
(boolean showTopBar)
true Determines whether the top bar, containing ClickThrough and Skip controls, is displayed
void shouldShowAdText
(boolean showAdText)
true Controls the visibility of the ad text next to the ClickThrough control
void setAdText
(string adText)
"Ad" Customizes the ad text on the video player
void shouldShowVolumeControl
(boolean showVolumeControl)
true Controls the visibility of the mute/unmute control
void setInitialAudio
(ANInitialAudioSetting initialAudio)
Sound On (Instream), Sound Off ( Banner Video) Sets the initial audio state for Instream and Banner Videos
void shouldShowSkip
(boolean showSkip) (Instream Video Only)
true Controls the visibility of the Skip control for Instream Video


// Show or Hide the ClickThrough control on the video player. Default is YES, setting it to NO will make the entire video clickable
// Change the ClickThrough text on the video player
// Show or hide fullscreen control on the player. This is applicable only for Banner Video
// Show or hide the top bar that has (ClickThrough & Skip control)
// Show or hide the "Ad" text next to the ClickThrough control
ANVideoPlayerSettings.getVideoPlayerSettings().setAdText("Video Ad");
// Show or hide the volume control on the player
// Decide how the ad video sound starts initially (sound on or off). By default, Instream Video will have sound enabled, while Banner Video will have sound disabled
// Show or hide the Skip control on the player
// Change the skip description on the video player
ANVideoPlayerSettings.getVideoPlayerSettings().setSkipDescription("Video Skip Demo");
// Change the skip button text on the video player
// Configure the skip offset on the video player