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

261
Views
MP4 video set to autoplay for the users. Using commonly used methods, it still doesn't autoplay?

Hello StackOverflow Community,

I am working on a website in which I want to display its features using a looped mp4 video.

Here is what I used to create this element:

<video width="1500" height="1000" autoplay loop muted playsinline>
              <source src="/assets/images/hero/videoexample.mp4" type="video/mp4" />
            </video>

When I did this, no matter what I changed, I would still get the below result:

Issue with autoplay

It would never automatically play the video to then not allow it to be looped.

This website is built on: HTML, JS, SCSS, CSS, and Primarily Bootstrap. I hope this information helps.

Any advice on what I should do would be greatly appreciated.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Add event listener oncanplay.

Take a look inline example:

<video width="1500" height="1000" autoplay loop muted playsinline oncanplay="() => {
    this.muted = true;
    this.play();
}"
>
 <source src="https://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4" />
</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!