Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

104
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!