title: Mp4 video in html5 video tag not playing in mobile chrome and mobile safari
body: <p>I have this code to play a video in a html5 page:</p>
  
  <pre><code>  &lt;video autoplay loop id="bgvid"&gt;
      &lt;source src="video-background.mp4" poster="/poster.png" type="video/mp4"&gt;
    &lt;/video&gt;
  </code></pre>
  
  <p>The problem is that it does not work in mobile chrome (Android Phone) and either in mobile safari (iPhone). But it works in "every" browser (tested with Safari, Chrome, Firefox) in desktop and also on mobile firefox (Android Phone).</p>
  
  <p>How can I overcame this problem? </p>
  
  <p><strong>Edit:</strong>
  Added this code:</p>
  
  <pre><code>  var myVideo = document.getElementById("bgvid");
  
    function playVid() {
        myVideo.play();
    }
  
    function pauseVid() {
        myVideo.pause();
    }
  </code></pre>
  
  <p>If I add a button that trigger the function playVid() it works. So I think the problem is on the autoplay. I tried to trigger the function with the load event but it does not works.</p>