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

216
Vistas
Video hides for a second when playing in safari

I'm playing some videos on mouseenter, and everything is working right on Chrome but not in Safari, here's an example of what happens: (Gif: https://gyazo.com/cc4693840cd30fee3f61cda6082e6f7f)

Also tried to play the video with 'canplay' event... Canplay

It hides itself just before playing the video... It should not jump, right after remove the poster the video should play... I've tried also with preload="auto" and loading the video first in js and after a few seconds playing it with a settimeout

It only happens the first time you hover the video (because it has to load)

First time it happens to me

Here's the code:

document.querySelectorAll('.work').forEach((work) => {
  work.addEventListener('mouseenter', function() {
    // this.querySelector('video').load();
    // setTimeout(() => {
      this.querySelector('video').play();
    // }, 3000);
  })
  work.addEventListener('mouseleave', function() {
    this.querySelector('video').currentTime = 0;
    this.querySelector('video').pause();
  });
});
.work {
  float: left;
  width: calc(50% - 5px);
}
.work:before {
  display: block;
  content: "";
  width: 100%;
  padding-top: 56.25%;
  pointer-events: none;
}
    
video {
  position: absolute;
  top: 0;
  left:0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  right: 0;
  left: 0; 
}
<div class="work"><video muted="" playsinline="" preload="metadata" loop="" src="https://player.vimeo.com/progressive_redirect/playback/670660302/rendition/1080p/1080p.mp4?loc=external&signature=23ceaaa3a5475f94cfbe326a81c9c01ce8b02a217e54c7262bb6cf23dd3390d3" poster="http://ticklefilm.com/new/wp-content/uploads/2021/12/IMG_9660-720x1080.jpg"></video></div>

about 4 years ago · Juan Pablo Isaza
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