there are pictures and videos
var videoBor = $(".swiper-slide");//videoswiper
var videolist = videoBor.find("video");//video
videolist.on("play",function(){
// mySwipertwo.autoplay.stop();
if($(this)[0].play){
console.log("");
mySwipertwo.autoplay.stop();
}
});
this code is not ineffective, but I can write a single button click. Why?
$("-sharpbtn1").click(function(){
mySwipertwo.autoplay.stop();
})
<div class="swiper-container Intelligent_work">
<div class="swiper-wrapper">
<div class="swiper-slide"><img src="Animages/zuoye_one.jpg"/></div>
<div class="swiper-slide"><img src="Animages/zuoye_twoi.jpg"/></div>
<!--<div class="swiper-slide"><img src="Animages/image2.jpg"/></div>-->
<div class="swiper-slide">
<video controls>
<source src="video/zuoye_video.mp4" type="video/mp4"></source>
video: <a href="myvideo.webm"></a>
</video>
</div>
</div>
<div class="swiper-pagination"></div>
</div>
Why is this? I hope the above code can run, how to achieve it?