javascript - How to stop slider when .mp4 video is played in mvc? -


i'm using "bxlider.js" plugin slide 1 "html<>" video , 2 image in mvc project. problem when i'm playing video, slider still sliding.

here code:

 $('.bxslider').bxslider({              auto: true,              autocontrols: true,          });
<ul class="bxslider">    <li>      <video id="homepagevdo" height="210" controls="controls" >        <source class="video-width" src="~/media/homepagevdo.mp4" type="video/mp4">      </video>    </li>    <li>      <img src="~/media/sample1.png" role="img" width="350" height="210" alt="sample1" title="sample1"/>    </li>    <li>      <img src="~/media/sample2.jpg" role="img" width="350" height="210" alt="sample2" title="sample2"/>    </li>  </ul>

please need help... other plugin van thanks.!!!

try :--

var slider = $('.bxslider').bxslider({                auto: true,                autocontrols: true,              }); 

and ever want stop bxslider use slider.stopshow(); , when start use slider.startshow(); shown below :-

$("#homepagevdo").on("pause", function (e) {    slider.startshow(); });  $("#homepagevdo").on("play", function (e) {    slider.stopshow(); }); 

Comments

Popular posts from this blog

c++ - OpenMP unpredictable overhead -

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

javascript - Wordpress slider, not displayed 100% width -