How do you set the slide that contains video to stay up for the length of the video before transitioning to the next slide?
Slider with Video Background
2 replies · opened Nov 18, 2016
OokjediNov 18, 2016
SSemicolon WebSTAFFNov 19, 2016
Hello,
It is not available by Default but is definitely possible. Please find the following code in the js/functions.js File inside the sliderRun: function() Function Block:
if( element.find('.swiper-slide.swiper-slide-active').find('video').length > 0 && sliderVideoAutoPlay == true ) { element.find('.swiper-slide.swiper-slide-active').find('video').get(0).play(); }and replace it with:
if( element.find('.swiper-slide.swiper-slide-active').find('video').length > 0 && sliderVideoAutoPlay == true ) {
swiperSlider.stopAutoplay();
element.find('.swiper-slide.swiper-slide-active').find('video').get(0).play();
element.find('.swiper-slide.swiper-slide-active').find('video').on( 'ended', function(){
swiperSlider.startAutoplay();
});
}This will definitely work fine. Additionally, make sure that the loop attribute is not defined inside the Video HTML Code.
Hope this Helps!
Let us know if we can help you with anything else or if you find any further issues.
OokjediNov 29, 2016
Great! Thank you!!
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