2

I am using html5 video tag in angular 4 app to autoplay video in background. I am unable to auto mute the video and because of that video is not autoplaying on mobile devices. Code I am using is:

<video playsinline autoplay loop controls = "controls" muted = "muted">
   <source src="banner-video.mp4" type="video/mp4" />
   <source src="banner-video.webm" type="video/webm" />
</video>

PS: Video is autoplaying on laptop but is not getting auto muted.

1 Answers1

0

Its like this question, you can read: Making HTML5 Video work on Android phones for tricky autoplay video.

But as described AngryFridges's answer nowadays muted and autoplay for silent video, you can add the 'muted' and 'autoplay' attributes together to enable autoplay for android devices.

e.g.

<video id="video" class="video" autoplay muted >
shafrianadhi
  • 642
  • 5
  • 8