Answer the question
In order to leave comments, you need to log in
How to make the slider stop when watching a video?
How to make the slider stop when watching a video?
3rd slide.
I found this piece of code! How to connect it with owlCarousel and send an event to stop when the video is clicked?
<script>
function onYouTubePlayerReady(playerId) {
ytplayer = document.getElementById("myytplayer");
ytplayer.addEventListener("onStateChange", "onytplayerStateChange");
}
function onytplayerStateChange(newState) {
alert("Player's new state: " + newState);
}
</script>
Answer the question
In order to leave comments, you need to log in
Use the YouTube API. + API owl carousel
owl.trigger('play.owl.autoplay',[1000]); //Запуск
owl.trigger('stop.owl.autoplay');//Остановка
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question