javascript - Swiper slider, pause html5 video when it's slide -


i using idangero.us swiper slider project. have 3 html5 videos in slider playing @ same time. need pause video when click next , play again when it's visible.

html:

    <div class="swiper-container">         <div class="swiper-wrapper">             <div class="swiper-slide">                 <video preload="auto" loop="" autoplay="">                     <source src=".../>                 </video>             </div>                           <div class="swiper-slide">                 <video preload="auto" loop="" autoplay="">                     <source src=".../>                 </video>             </div>                       </div>     </div>   

js:

var swiper = new swiper('.swiper-container', {     nextbutton: '.swiper-button-next',     prevbutton: '.swiper-button-prev',     autoplay: 5000, }); 


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -