Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • finfletc Friend
    #837183

    how can i get the video on the home page to autoplay?

    Adam M Moderator
    #838303

    Hi @finfletc,

    Please open file templates/ja_events_ii/acm/slideshow/tmpl/style-owl.php and go to the last line where you can see :

    autoplay: true

    change to (with uppercase, by default if set to true, the value is 5000 or you can use smaller value for shorter delay time) :

    autoPlay: true
    finfletc Friend
    #838509

    hello,
    thanks for your reply,
    is this the autoplay for the slideshow or the video?
    I was asking about the video module on the home page of the ja eventsii template.

    Adam M Moderator
    #839366

    Hi @finfletc,

    My bad, the code above work for the slideshow, the matter with video is much more complicated. Please stay tuned while I’m checking the workaround and I will reply back shortly.

    Best regards,

    Adam.

    Adam M Moderator
    #840062

    Hi @finfletc,

    Try open file templatesja_events_iiacmvideotmplstyle-1.php and look for this code :

    <div class="col-sm-5 video-player"><div class="video-wrapper">
        <?php if ($videoLink) { ?>
            <div id="videoplayer">
            <?php
                if (count($arr) == 2) :
                switch (trim($arr[0])) {
                  case 'vimeo':
                    ?>
                    <iframe id="player1" src="https://player.vimeo.com/video/<?php echo $video_link; ?>?api=1&amp;player_id=player1" width="630" height="354" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
                    <?php
                    break;
                  case 'youtube':
                    ?>
                    <img width="100%" height="100%" src="http://img.youtube.com/vi/<?php echo $video_link; ?>/maxresdefault.jpg" />
                    <?php
                    break;
                  default:
                    break;
                }
              endif;
            ?>
            </div>
            <a <?php if (count($arr) == 2) {if (trim($arr[0]) == 'youtube') {echo ' onclick="javideoPlay();" ';}} ?> title="Play" class="btn btn-border btn-border-inverse btn-rounded btn-play"><span class="sr-only">Watch the video</span><i class="fa fa-play"></i></a>
        <?php } ?>
    </div></div>

    then change as below :

    <div class="col-sm-5 video-player"><div class="video-wrapper playing">
        <?php if ($videoLink) { ?>
            <iframe id="videoplayer" width="640" height="390" src="https://www.youtube.com/embed/<?php echo $video_link; ?>?autoplay=1" frameborder="0" allowfullscreen></iframe>
        <?php } ?>
    </div></div>
    James Weston Friend
    #909473

    I was looking fro a similar solution. This helps by making it auto start but I would like to work out how to get the video to auto loop as sometimes when the video ends it shows other videos from youtube and sometimes the images that appear don’t look good on the site.

    tutek Friend
    #909583

    Hello

    and how to set lest the film loops?

    As the movie ends YOUTUBE tells other films – I do not want such an effect.

    Ninja Lead Moderator
    #909984

    @tutek:

    I check Youtube API here but I could not find that option unfortunately.

Viewing 8 posts - 1 through 8 (of 8 total)

This topic contains 7 replies, has 5 voices, and was last updated by  Ninja Lead 8 years, 7 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum