0

Why do I need to camelcase these HTML properties in react:

<video autoPlay loop muted playsInline>
    <source src={url} type="video/mp4" />
</video>

Why is it autoPlay and not autoplay? Or is this an error in my VSCode warnings?

antonwilhelm
  • 5,768
  • 4
  • 19
  • 45

1 Answers1

1

Javascript is case sensitive, so it might just not work with autoplay or playsinline.

But for this case, I think that this is just some common eslint (or some similar tool) warning, you can make sure by just passing those props in lowercase and see if it works