user1670082 user1670082 - 6 months ago 304
jQuery Question

Owl Carousel VIDEO Autoplay dosent work

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

Here is my jsfiddle:

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

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

Answer

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();
    }