Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

102
Visualizações
Show poster image instead of video on page load

Have an image that plays video onmouseover. Goes to poster image onmouseout. The only problem is it doesn't show the poster image when the page first loads, it shows the video(not playing, just image of video start screen). Everything else works just fine, I just want the poster image to be showing when the page first loads. I'm not the best with script so not sure what else to try. Any and all help is appreciated.

<video poster="myimage.png" src=myvideo.mp4 class="myvideo" controls="" loop="" 
 width="auto" height="300" alt="" ></video>
$(document).ready(function() {
$(".myvideo").on("mouseover", function(event) {
    $(this).get(0).play();
  
  }).on('mouseout', function(event) {
    this.load();
  });
})

 {
  let d = new Date();
  text.value += `${d.getHours()}:${d.getMinutes()}:${d.getSeconds()} | ${event.type} [target: ${event.target.id}]\n`.replace(/(:|^)(\d\D)/, '$10$2');
  text.scrollTop = text.scrollHeight;
}
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can set preload="none" on video tag to avoid loading video immediately and object-fit: cover in style for your image to cover the video.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda