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

349
Views
react boolean attribute not working, video not autoplaying

I have a react <video> component. And I have added autoplay as an attribute.

<video autoplay muted src="/vids/vid.mp4">

And not working. But when I set autoplay="true" it starts working.

<video autoplay="true" muted src="/vids/vid.mp4">  //Works

why is it for a boolean attribute, only putting autoplay is not working on react? on other occasions for attributes like hidden it works.

Why is this happening? Which one is the correct way to specify boolean attribute?

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

0

I had the same problem with the autoplay attribute with React. You want to use autoPlay instead. You should then just be able to use it like this:

<video autoPlay muted src="/vids/vid.mp4">
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!