I'am using Vuejs2 and vue awesome swiper, I can add video autoplay in slider but i can't control video play when slide active in video data. can video autoplay just when slider active in video?.
This is my code
<swiper :options="swiperOption">
<swiper-slide v-for="(slider, index) in sliders" :key="index" :data-swiper-autoplay="slider.delay">
<img :src="`http://localhost:8000/photos/image/${slider.img}`">
<video id="video" autoplay :src= "slider.video"></video>
</swiper-slide>
</swiper>
<script>
export default {
data() {
return {
private: {
privateData : 'private'
},
swiperOption: {
notNextTick: true,
setWrapperSize :true,
spaceBetween: 30,
centeredSlides: true,
autoplay: {
delay: 500,
disableOnInteraction: false
},
pagination: {
el: ".swiper-pagination",
clickable: true
},
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev"
},
// history: {
// replaceState: true
// }
}
};
},
}
</script>
Thanks