Translating the UI
Button labels, error messages and the Picture-in-Picture message are in English by default. Override them with
VegaPlayer.i18n before the players are created, for example right after importing the module. Keys you
leave out keep their English text.
import VegaPlayer from './vega-player.js';
VegaPlayer.i18n = { ...VegaPlayer.i18n, play: 'Reproducir', pause: 'Pausa', stop: 'Detener', seek: 'Buscar', speed: 'Velocidad', captions: 'Subtítulos', quality: 'Calidad', auto: 'Auto', mute: 'Silenciar', volume: 'Volumen', pip: 'Imagen en imagen', pipMessage: 'Reproduciendo en modo imagen en imagen', cast: 'Enviar', fullscreen: 'Pantalla completa', exitFullscreen: 'Salir de pantalla completa', close: 'Cerrar', errorDefault: 'No se puede cargar el vídeo', errorAborted: 'Carga del vídeo cancelada', errorNetwork: 'Error de red', errorDecode: 'No se pudo descodificar el vídeo', errorFormat: 'Formato de vídeo no compatible',};All keys
Section titled “All keys”| Key | Default |
|---|---|
play / pause / stop | Play / Pause / Stop |
seek | Seek |
speed | Playback speed |
captions | Captions |
quality / auto | Quality / Auto |
mute / volume | Mute / Volume |
pip / pipMessage | Picture-in-Picture / Playing in Picture-in-Picture mode |
cast | Cast |
fullscreen / exitFullscreen | Fullscreen / Exit fullscreen |
close | Close |
errorDefault | Unable to load video |
errorAborted | Video loading aborted |
errorNetwork | Network error |
errorDecode | Video decoding failed |
errorFormat | Video format not supported |
Per-player texts
Section titled “Per-player texts”Texts that belong to each player are set with attributes: modal-title, modal-description,
modal-cta-text, error-title, error-retry-text and captions-label.