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 -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -