Nota:
El acceso a esta página requiere autorización. Puede intentar iniciar sesión o cambiar directorios.
El acceso a esta página requiere autorización. Puede intentar cambiar los directorios.
ANVideoPlayerSettings La clase permite a la aplicación del publicador personalizar algunos de los controles o la interfaz de usuario de Ad Video Player.
Nota:
La personalización se aplica a todos los anuncios de vídeo que se sirven a través del SDK de Xandr, tanto Enstream como Banner Video(Outstream).
| Función | Configuración predeterminada | Descripción | Unidades de anuncios compatibles con la configuración |
|---|---|---|---|
void shouldShowClickThroughControl (booleano showClickThroughControl) |
true | Determina si se muestra el control ClickThrough. Si se establece en false, se puede hacer clic en todo el vídeo. | Vídeo instream/banner |
void setClickThroughText (cadena clickThroughText) |
"Más información" | Personaliza el texto asociado al control ClickThrough. | Vídeo instream/banner |
void shouldShowFullScreenControl (booleano showFullScreenControl) (Solo vídeo de Banner) |
true | Controla la visibilidad del botón de pantalla completa. | Vídeo de banner |
void shouldShowTopBar (booleano showTopBar) |
true | Determina si se muestra la barra superior, que contiene los controles ClickThrough y Skip. | Vídeo instream/banner |
void shouldShowAdText (booleano showAdText) |
true | Controla la visibilidad del texto del anuncio junto al control ClickThrough. | Instream / Banner Video / Interstitial |
void setAdText (cadena adText) |
"Anuncio" | Personaliza el texto del anuncio en el reproductor de vídeo. | Instream / Banner Video / Interstitial |
void shouldShowVolumeControl (booleano showVolumeControl) |
true | Controla la visibilidad del control mute/unmute. | Vídeo instream/banner |
void setInitialAudio (ANInitialAudioSetting initialAudio) |
Sound On (Instream), Sound Off (Banner Video) | Establece el estado de audio inicial. | Vídeo instream/banner |
void shouldShowSkip (booleano showSkip) (Solo vídeo en secuencia) |
true | Controla la visibilidad del control Skip. | Instream/Interstitial |
void setSkipDescription (StringskipDescription) |
"Omitir en %%TIME%%s" | Personaliza omitir descripción. | Instream/Interstitial |
void setSkipLabelName (StringskipLabelName) |
"Omitir anuncio" | Personaliza Omitir etiqueta. | Instream/Interstitial |
void setSkipOffset (EnteroskipOffset) |
"5 segundos" | Personaliza Omitir desplazamiento. | Instream/Interstitial |
Ejemplo
// Show or Hide the ClickThrough control on the video player. Default is YES, setting it to NO will make the entire video clickable
ANVideoPlayerSettings.getVideoPlayerSettings().shouldShowClickThroughControl(false);
// Change the ClickThrough text on the video player
ANVideoPlayerSettings.getVideoPlayerSettings().setClickThroughText("SampleText");
// Show or hide fullscreen control on the player. This is applicable only for Banner Video
ANVideoPlayerSettings.getVideoPlayerSettings().shouldShowFullScreenControl(true);
// Show or hide the top bar that has (ClickThrough & Skip control)
ANVideoPlayerSettings.getVideoPlayerSettings().shouldShowTopBar(true);
// Show or hide the "Ad" text next to the ClickThrough control
ANVideoPlayerSettings.getVideoPlayerSettings().shouldShowAdText(true);
ANVideoPlayerSettings.getVideoPlayerSettings().setAdText("Video Ad");
// Show or hide the volume control on the player
ANVideoPlayerSettings.getVideoPlayerSettings().shouldShowVolumeControl(true);
// 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
ANVideoPlayerSettings.getVideoPlayerSettings().setInitialAudio(DEFAULT);
ANVideoPlayerSettings.getVideoPlayerSettings().setInitialAudio(SOUND_ON);
ANVideoPlayerSettings.getVideoPlayerSettings().setInitialAudio(SOUND_OFF);
// Show or hide the Skip control on the player
ANVideoPlayerSettings.getVideoPlayerSettings().shouldShowSkip(true);
// Change the skip description on the video player
ANVideoPlayerSettings.getVideoPlayerSettings().setSkipDescription("Video Skip Demo");
// Change the skip button text on the video player
ANVideoPlayerSettings.getVideoPlayerSettings().setSkipLabelName("Test");
// Configure the skip offset on the video player
ANVideoPlayerSettings.getVideoPlayerSettings().setSkipOffset(2);