Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Video is not playing automatically in React JS

Hy, I want to play videos automatically without controls. because I’m using it as a website banner background. Please point out what I have done wrong. I’m using chrome browser.

  <video
          autoPlay
          // playsinline
          autoplay
          muted
          loop
          className="stakingNft"
        >
        <source src="\assets\video\landing.mp4" type="video/mp4" />  
  </video>

--------------------------------

  <video
          autoPlay
          playsinline
          autoplay
          muted
          loop
          className="stakingNft"
        >
        <source src="\assets\video\landing.mp4" type="video/mp4" />  
  </video>

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Here is the codesandbox

autoPlay might be defined twice and in small case that’s the reason I think.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading