سؤال

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>
هل كانت مفيدة؟

المحلول

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();
    }
 });
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top