【问题标题】:Owl Carousel VIDEO Autoplay dosent work猫头鹰轮播视频自动播放不起作用
【发布时间】:2014-02-17 20:17:34
【问题描述】:

我使用 OWL Carousel,我想自动播放视频(幻灯片的背景视频),但显然 owl carousel 会停止视频。

这是我的 jsfiddle:

http://jsfiddle.net/EGrGN/35/

    <video width="320" height="240" autobuffer controls autoplay>

【问题讨论】:

  • 嗨。下面的答案对你有用吗?我们尝试了相同的功能,但在所有浏览器中都没有得到任何乐趣。在 FF 中播放一次,在 Chrome 或 Safari 中根本没有播放...有点奇怪,所以寻找一些指针。

标签: jquery video carousel frontend owl-carousel


【解决方案1】:

可以在回调afterAction中调用jQuery函数play()

 owl.owlCarousel({
    navigation: true, // Show next and prev buttons
    slideSpeed: 300,
    paginationSpeed: 400,
    singleItem: true,
    afterAction: function(current) {
        current.find('video').get(0).play();
    }
 });

【讨论】:

  • 如何停止其他非活动幻灯片中的所有其他视频?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-10-08
  • 1970-01-01
  • 2016-07-12
  • 2023-03-29
相关资源
最近更新 更多