Более корректное воспроизведение видео при быстром пролистывании (fix)
This commit is contained in:
parent
c710fdd56a
commit
f953780e84
2
index.js
2
index.js
|
@ -348,6 +348,7 @@ const init = async (items = [], options = {}, index = 0) => {
|
|||
});
|
||||
|
||||
swiper.on('slideChange', function () {
|
||||
setTimeout(() => {
|
||||
for (const [index, slide] of Object.entries(this.slides)) {
|
||||
if (slide.classList.contains('advdominion-lg__item_video')) {
|
||||
if (Number(index) === this.activeIndex) {
|
||||
|
@ -358,6 +359,7 @@ const init = async (items = [], options = {}, index = 0) => {
|
|||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
swiper.on('resize', function () {
|
||||
if (isVideoInGallery.yt || isVideoInGallery.vk || isVideoInGallery.rt) {
|
||||
|
|
Loading…
Reference in New Issue