Header slider issue on bg video using youtube

1 reply · opened Jul 23, 2018

Llsir_sgJul 23, 2018

Hi Support,

I am copying your slider code based on the 'header-transparent.html', am using the youtube video as my slider background, however the video slider does not auto slide to next when it finished, it just keep looping the first slide video.

  1. How can i move to next video on 1st video end?

  2. Can i set the cover image before the video able to load?

  3. How can ensure the video can fit in different screen size? Currently, it does cut off some part the video.

Here my slider code:

<!-- #slider start -->
<section id="slider" data-loop="true" data-autoheight="true" class="slider-element slider-parallax swiper_wrapper clearfix " style="height: 600px;">
<div class="swiper-container swiper-parent">

<div class="swiper-wrapper">
<div class="swiper-slide dark">
<div class="yt-bg-player nomargin dark" data-autoplay="false" data-start="3" data-stop="30" data-fullscreen="true" data-video="https://youtu.be/WNCl-69POro">
<div class="container-fluid vertical-middle center clearfix">
</div>
</div>
<div class="video-overlay" style="background-color: rgba(0,0,0,0.1);"></div>
</div>
<div class="swiper-slide dark">
<div class="container center vertical-middle clearfix">
</div>
<div class="yt-bg-player" style="z-index: auto;" data-quality="hd1080" data-start="30" data-stop="45" data-video="https://youtu.be/qgzn86vgbDE" />
</div>
</div>
<div class="swiper-slide dark" style="background-image: url('http://themes.semicolonweb.com/html/canvas/images/slider/swiper/1.jpg'); background-position: center top;">
<div class="container clearfix">
<div class="slider-caption">
</div>
</div>
</div>
</div>
<div class="slider-arrow-left"><i class="icon-angle-left"></i></div>
<div class="slider-arrow-right"><i class="icon-angle-right"></i></div>
<!-- <div class="swiper-pagination"></div> -->
</div>
</section>
<!-- #slider end -->

SSemicolon WebSTAFFJul 26, 2018

Hello,

  1. Simply add the data-swiper-autoplay="2000" Attribute to the .swiper-slide Element where you have defined the Youtube Video. Also change the 2000 Value according to the Duration of your Youtube Video.

  2. Unfortunately, this is currently not supported.

  3. Can you please provide us with a Live URL so that we can check out the exact issue and provide you with a more accurate solution for this. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard