title: Autoplay video in Bootstrap modal window on modal opening
body: <p>I have a Bootstrap 3.3.7 modal window which contains a video using the HTML5 video tag, e.g.</p>
  
  <pre><code>&lt;video controls autoplay&gt;
      &lt;source src="video.mp4" type="video/mp4"&gt;
      Your browser does not support the video tag.
  &lt;/video&gt;
  </code></pre>
  
  <p>The trouble with this is that when my web page loads, the video starts playing (even though it cannot be "seen" since the modal is closed, the audio also plays).</p>
  
  <p>I understand that the <code>autoplay</code> tag is doing this. But how can I get the video to autoplay when the modal is loaded? And stop when the modal is closed?</p>