A
A
Anton Essential2016-09-16 14:13:07
YouTube
Anton Essential, 2016-09-16 14:13:07

How to stop youtube video playing when switching slide?

Good afternoon, please tell me how to stop playing a youtube video when switching the slide in which it is located. I use bxslider, I put ifarme from youtube in the slide, when I switch the slide, the previous video continues to play.

.bx-slider
  .slide
    <iframe width="560" height="315" src="https://www.youtube.com/embed/lwI6-jKlsO0" frameborder="0" allowfullscreen></iframe>
  .slide
    <iframe width="560" height="315" src="https://www.youtube.com/embed/lwI6-jKlsO0" frameborder="0" allowfullscreen></iframe>
  .slide
    <iframe width="560" height="315" src="https://www.youtube.com/embed/lwI6-jKlsO0" frameborder="0" allowfullscreen></iframe>

$('#next3').click(function(){
  slider11.goToNextSlide();
return false
});
$('#prev3').click(function(){
  slider11.goToPrevSlide();
  return false
});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2016-09-16
@politon

API yuotube https://developers.google.com/youtube/iframe_api_r...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question