Html Chrome does not play autoplay

1

Usually it happens to me that when working in Chrome the first few times it manages to load videos without any inconvenience but after a while, they no longer load the videos. It only happens in Chrome, while in Firefox, Edge, Safari and Opera, there is no problem. Any solution, suggestion? I thank you, Best regards.

The code is nothing special:

<video autoplay loop>
  <source src="videos/home-background.mp4" type="video/mp4">
  <source src="videos/slide-background.webm" type="video/webm">
        Your browser does not support the video tag.
</video>
    
asked by Francisco Flores Delzon 14.06.2018 в 18:41
source

1 answer

2

Guys, I already found a solution. Attached the link where a little more detail the autoplay in google developers and another link from where I found the answer.

The solution is to add the "muted" attribute inline, since it seems that google automatically blocks the autoplay, however when putting the attribute muted it is solved.

<video class="d-block w-100" muted autoplay loop>
 <source src="videos/background-mov.mp4" type="video/mp4">
     Your browser does not support the video tag.
</video>

Other solutions that arise in the article, is to use webm first in the list, force the muted and autoplay by js. Anyway, I think that with the muted enough, at least it served me.

link

link

    
answered by 13.09.2018 в 22:34