function vidik () {
let videoSlider = $('.is-flipped').find('.vv')[0];
if (videoSlider) {
videoSlider.play();
} else {
$('.vv')[0].pause();
}
}
swiperSlider.on('slideChange', function () {
let activeIndex = swiperSlider.realIndex;
$('.main-swiper-slide').each(function (index, item) {
if (activeIndex == index) {
item.classList.add('is-flipped');
vidik();
} else {
item.classList.remove('is-flipped');
vidik();
}
});
});
youtubePlayer.contentWindow.postMessage(JSON.stringify({
type: 'player:pause',
data: {}
}), '*');