CleverProgrammers / cp-disney-plus-clone

Here's the DEMO Disney+ Clone App
https://disney-clone-d1e27.web.app
337 stars 261 forks source link

the video is not playing in Viewers.js #2

Closed coolveer closed 3 years ago

coolveer commented 3 years ago
<video autoPlay={true} loop={true} playsInline={true}>
       <source src="/videos/1608229455-star-wars.mp4" type="video/mp4" />
 </video>

this code adds the video but the video was not playing in crome

the solution to this is that you just have to add muted to the video code just like this

<video autoPlay={true} loop={true} playsInline={true} muted>
        <source src="/videos/1608229455-star-wars.mp4" type="video/mp4" />
</video>

just a little help from my side if someone gets stuck

Faruk-Suljagic commented 3 years ago

Can you please explain why 'muted' worked?

jdanglade commented 3 years ago

I would also like to know, why did 'muted' work?

SudhanshuBlaze commented 2 years ago

Chrome does not allow videos to autoplay if it's muted.