title: How to add background video to html page?
body: <p>I also know this question is a duplicate, but I've seen all question about background video,checked many other sites for answer, and everyone writes the same code, but it's still not working for me for some reason...</p>
  
  <p>So, here's the simple code I have:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#loading {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100vw;
    height: 100vh;
    background-color: rgba(192, 192, 192, 0.5);
  }
  
  #bgvideo {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 100%; 
    min-height: 100%;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="loading"&gt;
    &lt;video id="bgvideo"&gt;
      &lt;source src="CM.mp4" type="video/mp4"&gt;
    &lt;/video&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>This code should be working according to the answers I've seen, but the video is just not playing.</p>
  
  <p>Does someone know what can be the problem? Is it the code, or the source of the problem is something else?</p>