Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

113
Vistas
Vue - Adding background animation

I'm trying to add some background mp4/gif animation to my webpage, but for some reason it's not working - it only shows some black placeholder for (what seems to be) the animation.

This is the library I've tried to use: https://github.com/pespantelis/vue-videobg

Having followed the instructions, I've ended up with this (only showing relevant sections):

The main.js file:

// eslint-disable-next-line import/extensions
import VideoBg from 'vue-videobg';

Vue.component('video-bg', VideoBg);

The Comp.Vue component file:

<template>
  <div>
    <v-container fluid class="primary">
      <v-row>
        <v-col>
          <video-bg :sources="['../assets/witchcraft-magic.mp4']"
                    img="../assets/vast.png">
          </video-bg>
        </v-col>
      </v-row>
    </v-container>
  </div>
</template>

BTW the same outcome happened to me while trying using other libraries - for example https://github.com/avidofood/vue-responsive-video-background-player so I guess there's something basic I'm doing wrong

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Sometimes .. in the path does not work. Try giving the complete path like

<video-bg :sources="['<project-name>/assets/witchcraft-magic.mp4']"
                img="<project-name>/assets/vast.png">
      </video-bg>
about 4 years ago · Juan Pablo Isaza Denunciar

0

Try :

:sources="[require('@/assets/witchcraft-magic.mp4')]"

:img="require('@/assets/img/vast.png')"
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda