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

357
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
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