A
A
antbelogurov2021-01-19 19:00:00
JavaScript
antbelogurov, 2021-01-19 19:00:00

How to switch slides in the slider after the end of playback?

It is necessary to switch slides at the end of video playback.
In slick, you can only set a fixed time for scrolling through the slides (for example, 3 seconds)
I can calculate the length of the video through video.duration, but then the other video will have the same time.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladislav Chernenko, 2021-01-19
@antbelogurov

Well, something like this:

$('video').on('ended', function(){
    $('.slick-slider').slickNext();
});

K
Kovalsky, 2021-01-19
@lazalu68

Enable autoplay by default, after slider initialization call slickPause, after video call slickPlay

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question