Compartir a través de


Personalización de las opciones del reproductor de vídeo en iOS

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 En streaming como Banner Video (Outstream).

Propiedad Configuración predeterminada Descripción Unidades de anuncios compatibles con la configuración
BOOLshowClickThruControl true Determina si se muestra el control ClickThrough. Si se establece en false, se puede hacer clic en todo el vídeo. Vídeo de instream/banner
NSString*clickThruText "Más información" Personaliza el texto asociado al control ClickThrough. Vídeo de instream/banner
BOOLshowFullScreenControl (Solo vídeo de Banner) true Controla la visibilidad del botón de pantalla completa. Vídeo de banner
BOOLshowTopBar true Determina si se muestra la barra superior, que contiene los controles ClickThrough y Skip. Vídeo de instream/banner
BOOLshowAdText true Controla la visibilidad del texto del anuncio junto al control ClickThrough. Vídeo instream/banner/intersticial
NSString*adText "Anuncio" Personaliza el texto del anuncio en el reproductor de vídeo. Vídeo instream/banner/intersticial
BOOLshowVolumeControl true Controla la visibilidad del control mute/unmute. Vídeo de instream/banner
ANInitialAudioSettinginitalAudio Sound On (Instream Video), Sound Off (Banner Video) Establece el estado de audio inicial. Vídeo de instream/banner
BOOLshowSkip true Controla la visibilidad del control Skip. Instream
NSString*skipDescription "Omitir en %%TIME%%s" Personaliza omitir descripción. Instream
NSString*skipLabelName "Omitir anuncio" Personaliza Omitir etiqueta. Instream
NSInteger*skipOffset "5 segundos" Personaliza Omitir desplazamiento. Instream

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 sharedInstance] setShowClickThruControl:NO];

// Change the ClickThrough text on the video player
[[ANVideoPlayerSettings sharedInstance] setClickThruText:@"SampleText"];

// Show or hide fullscreen control on the player. This is applicable only for Banner Video
[[ANVideoPlayerSettings sharedInstance] setShowFullScreenControl:YES];

// Show or hide the top bar that has (ClickThrough & Skip control)
[[ANVideoPlayerSettings sharedInstance] setShowTopBar:YES];

// Show or hide the "Ad" text next to the ClickThrough control
[[ANVideoPlayerSettings sharedInstance] setShowAdText:YES];
[[ANVideoPlayerSettings sharedInstance] setAdText:@"Video Ad"];

// Show or hide the volume control on the player
[[ANVideoPlayerSettings sharedInstance] setShowVolumeControl:YES];

// 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 sharedInstance] setInitalAudio:Default];
[[ANVideoPlayerSettings sharedInstance] setInitalAudio:SoundOn];
[[ANVideoPlayerSettings sharedInstance] setInitalAudio:SoundOff];

// Show or hide the Skip control on the player
[[ANVideoPlayerSettings sharedInstance] setShowSkip:YES];

// Change the skip description on the video player
[[ANVideoPlayerSettings sharedInstance] setSkipDescription:@"Video Skip Demo"];

// Change the skip button text on the video player
[[ANVideoPlayerSettings sharedInstance] setSkipLabelName:@"Test"];

// Configure the skip offset on the video player
[[ANVideoPlayerSettings sharedInstance] setSkipOffset:2];