Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author blueimp

    (@blueimp)

    There is no setting, but you can try adding the following jQuery snippet:

    $('#blueimp-gallery').on('slidecomplete', function (event, index, slide) {
        var video;
        if ($(this).data('gallery').index === index) {
            video = $(slide).find('video').get(0);
            if (video) {
                video.play();
            }
        }
    });

    I also wanted the same. Tried adding the code in the template file but not working as yet so please do let me know about it.

    Thanks.

    Plugin Author blueimp

    (@blueimp)

    My code snippet above will only work for custom HTML5 videos.
    For YouTube/Vimeo you can enable the clickToPlay options by editing the Gallery template and adding the following attributes:

    <div id="blueimp-gallery" class="blueimp-gallery" data-you-tube-click-to-play="false" data-vimeo-click-to-play="false">
        ...
    </div>

    https://github.com/blueimp/Gallery#youtube-options

    Hi,

    Thanks for your reply.
    Actually I meant the auto play directly rather than the circular play button which comes up first when we select a link. I have already done autoplay for vimeo.

    Thanks.

    Hi,

    The youTubeClickToPlay option removes one less click.
    After clicking on a link, the lightbox appears with the video screenshot and a circular video button.

    How can we remove this step?
    Basically I want to click on my link and the lightbox appears with the video playing automatically.

    One click > lightbox appears > video plays.

    Is this possible?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Autoplay for video?’ is closed to new replies.