我的html中有一个图像滑块元素,如下所示:

  <div class="slider">
    <img/>
    <img/>
    <iframe src="https://player.vimeo.com/video/"</iframe>
    <img/>
  </div>


带有iframe视频。目前,它继续在后台播放。使用下一个/上一个导航图标(.next和.prev)导航时,我想停止/刷新视频。

我怎样才能最好地做到这一点?

最佳答案

您必须使用video而不是iframe

<video controls>
<source src="Your Path" type="video/mp4">
Your browser does not support the video tag.
</video>


Working jsfiddle here

关于jquery - 单击导航图标停止/重置<iframe>视频,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/34812763/

10-12 00:10
查看更多