title: How to pause Bootstrap 2 carousel while a video plays in a slider
body: <p>Here is my Bootstrap 2 carousel that contains one html5 video and 2 images (I have to use Bootstrap 2 and jQuery 1.9.1 in this project): </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>// without this script, the slider doesn't start on it's own:
    !function ($) {
      $(function(){
        $('#homepage_slider').carousel()
      })
    }(window.jQuery)</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#homepage_slider video { 
      min-height: 100% !important;
      min-width: 100% !important;
   height: auto !important;
      width: auto !important;
   overflow: hidden;
  }
  
  #homepage_slider img {
    width: 100%;
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    border: 0;
  }
  
  .carousel-inner&gt;.item&gt;img {
    display: block;
    line-height: 1;
  } </code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/css/bootstrap.min.css"&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/js/bootstrap.min.js"&gt;&lt;/script&gt;
  
  &lt;div id="banner"&gt;
  
           
  &lt;!-- Slider begins here --&gt;
  &lt;div id="homepage_slider" class="carousel slide"&gt;
    &lt;ol class="carousel-indicators"&gt;
    &lt;li data-target="#homepage_slider" data-slide-to="0" class="active"&gt;&lt;/li&gt;
    &lt;li data-target="#homepage_slider" data-slide-to="1"&gt;&lt;/li&gt;
    &lt;li data-target="#homepage_slider" data-slide-to="2"&gt;&lt;/li&gt;
   &lt;/ol&gt;
       
    &lt;!-- Carousel items --&gt;
  &lt;div class="carousel-inner"&gt;
   &lt;!-- slide #1 --&gt;
   &lt;div data-slide="0" class="item active"&gt;
    &lt;video title="1" id="bgvid" autoplay loop muted poster="http://www.thefrasier.com/wp-content/themes/frasier/images/Frasier_Home_120314.jpg"&gt;&lt;source src="http://www.thefrasier.com/wp-content/uploads/2014/12/0_final_reel_home.webm" type="video/webm"&gt;Your browser does not support the video tag.&lt;/video&gt;
   &lt;/div&gt;
            
   &lt;!-- slide #2 (image) --&gt;
      &lt;div data-slide="1" class="item"&gt;
        &lt;img title="2" alt="image of hotel" src="http://hdcoolwallpapers.com/wp-content/uploads/2014/09/Hd-Ocean-Wallpapers-5.jpg"&gt;
   &lt;/div&gt;
   &lt;!-- slide #3 (image) --&gt;
   &lt;div data-slide="2" class="item"&gt;
        &lt;img title="3" alt="image of apartment" src="http://imgs.abduzeedo.com/files/gismullr/beautifulhouses/bh306/wh01.jpg"&gt;
   &lt;/div&gt;
   
    &lt;/div&gt; &lt;!-- end of '.carousel-inner' --&gt;
  
   &lt;!-- Carousel nav --&gt;
   &lt;a class="carousel-control left" href="#homepage_slider" data-slide="prev"&gt;&amp;lsaquo;&lt;/a&gt;
   &lt;a class="carousel-control right" href="#homepage_slider" data-slide="next"&gt;&amp;rsaquo;&lt;/a&gt;
    &lt;/div&gt; &lt;!-- end of '#homepage_slider' --&gt;
    &lt;!-- Slider ends here --&gt;
   
  
  &lt;/div&gt;  &lt;!-- end of "#banner" --&gt;
    </code></pre>
  </div>
  </div>
  </p>
  
  <p>Currently the slider doesn't start on its own so I had to include the .carousel() script to make it start.</p>
  
  <p>Problem: the carousel doesn't pause while the video is playing.  How can I make slider pause while the video is playing and then resume after the video is done playing? And then when video slide becomes active again, to make video play again (and slider to pause again)?</p>
  
  <p>Note: The slider will always have only 1 video and unlimited amount of images in any order.  </p>
  
  <p>Thank you so much for your help! 
  (Here is the same project on CodePen: <a href="https://codepen.io/mashablair/pen/eWLRJg" rel="nofollow noreferrer">https://codepen.io/mashablair/pen/eWLRJg</a> )  </p>