HTML5 Video not running on mobile

1

I'm creating a project in which I have a video scrolling in the page in the background, the desktop version is working perfectly, but in mobile the video does not execute and only the blue screen (div I put to give an opacity in the video).

<video autoplay loop id="video-background" muted>
 <source src="expo.mp4" type="video/webm">
</video>

Test server: link

Can anyone help me?

    
asked by anonymous 27.01.2018 / 02:54

1 answer

1

As answered here , mobile devices do not play videos in background . It is interesting to include the poster attribute in the <video> tag, which will display a still image instead of the video.

In order for the background not to be just one color, put an image related to the video in poster :

<video autoplay loop id="video-background" muted poster="imagem.jpg">
    
27.01.2018 / 03:53