猫头鹰旋转木马视频自动播放功能 [英] Owl Carousel VIDEO Autoplay dosent work

查看:20
本文介绍了猫头鹰旋转木马视频自动播放功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I use OWL Carousel and I want to autoplay the video (background video for the slides) but apparently owl carousel stops the video.

这是我的 jsfiddle:

Here is my jsfiddle:

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

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

推荐答案

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

You can call the jQuery function play() in the callback afterAction:

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

这篇关于猫头鹰旋转木马视频自动播放功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆