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
Post a Comment