Answer the question
In order to leave comments, you need to log in
How to pause video on slide change in Slick slider?
There is a slide with a youtube video connected via the YouTube Player API.
How to make it so that when changing a slide, the video stops on the previous slide and starts playing on the current slide
https://codepen.io/MikD/pen/yLLJMOz
Answer the question
In order to leave comments, you need to log in
There are two events in the slider api - beforeChange and afterChange.
create only one object. and when changing the slide, call the player.loadVideoById(videoId) object method
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question