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.
La ANVideoPlayerSettings clase permite a las aplicaciones del publicador personalizar algunos de los controles de interfaz de usuario del reproductor de vídeo de anuncios.
Nota:
Esta configuración se aplica a todos los anuncios de vídeo que se ofrecen a través del SDK de Mobile: vídeo en secuencia, vídeo de banner (outstream) y vídeo intersticial.
| Función | Configuración predeterminada | Descripción | Unidades de anuncios compatibles con la configuración |
|---|---|---|---|
void shouldShowClickThroughControl(boolean showClickThroughControl) |
true | Determina si se muestra el control click-through. Si se establece en false, se puede hacer clic en todo el vídeo. | Instream / Banner Video / Interstitial |
void setClickThroughText(String clickThroughText) |
"Más información" | Personaliza el texto asociado al control click-through. | Instream / Banner Video / Interstitial |
void shouldShowFullScreenControl(boolean showFullScreenControl) |
true | Controla la visibilidad del botón de pantalla completa. | Vídeo de banner |
void shouldShowTopBar(boolean showTopBar) |
true | Obsoleto. Determina si se muestra la barra superior (que contiene los controles click-through y skip). Este método ya no es funcional y se quitará en una versión futura del SDK. | Vídeo instream/banner |
void shouldShowAdText(boolean showAdText) |
true | Controla la visibilidad del texto del anuncio junto al control click-through. | Instream / Banner Video / Interstitial |
void setAdText(String adText) |
"Anuncio" | Personaliza el texto del anuncio en el reproductor de vídeo. | Instream / Banner Video / Interstitial |
void shouldShowVolumeControl(boolean showVolumeControl) |
true | Controla la visibilidad del control mute/unmute. | Instream / Banner Video / Interstitial |
void setInitialAudio(ANInitialAudioSetting initialAudio) |
Sonido activado (intersticial / instream), sonido desactivado (vídeo de banner) | Establece el estado de audio inicial. | Instream / Banner Video / Interstitial |
void shouldShowSkip(boolean showSkip) |
true | Controla la visibilidad del control Skip. | Instream/Interstitial |
void setSkipDescription (StringskipDescription) |
"Omitir anuncio en %%TIME%%" | 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 |
void shouldForceControlBarVisible (booleanoforceControlBarVisible) |
true | Cuando se establece en true, la barra de control de vídeo (reproducir/pausar, buscar, volumen y otros controles) permanece visible permanentemente, independientemente de la interacción del usuario.Cuando se establece en false, el reproductor usa el comportamiento de ocultación automática, donde la barra de control se oculta después de un período de inactividad. |
Instream / Banner Video / Interstitial |
void shouldClickBehaviorPausePlay(boolean clickBehaviorPausePlay) |
true | Cuando se establece en true (valor predeterminado), al pulsar el vídeo se alterna la reproducción y la pausa. Cuando se establece en false, las pulsaciones se pasan a otros controladores (por ejemplo, hacer clic). |
Instream / Banner Video / Interstitial |
Ejemplo
// Show or hide the ClickThrough control on the video player. Default is true; setting it to false makes 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);
// Deprecated: this method is no longer functional and will be removed in a future SDK version
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(ANInitialAudioSetting.DEFAULT);
ANVideoPlayerSettings.getVideoPlayerSettings().setInitialAudio(ANInitialAudioSetting.SOUND_ON);
ANVideoPlayerSettings.getVideoPlayerSettings().setInitialAudio(ANInitialAudioSetting.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. Minimum value is 5 seconds; lower values are clamped to 5
ANVideoPlayerSettings.getVideoPlayerSettings().setSkipOffset(2);
// Show or hide the control bar permanently (default is true to always show). If set to false, the player will auto-hide the control bar after inactivity.
ANVideoPlayerSettings.getVideoPlayerSettings().shouldForceControlBarVisible(false);
// When set to true (default), tapping the video toggles play/pause. Set to false to pass taps to other handlers (for example, click-through)
ANVideoPlayerSettings.getVideoPlayerSettings().shouldClickBehaviorPausePlay(false);