Okay
  Public Ticket #154993
prevent looping video in nectar slider
Closed

Comments

  • Krishna started the conversation
    I do not want the video in the nectar slider to loop. How do I make it stop on either the first or last frame after playing once?
  •  1,071
    ThemeNectar replied

    Hey Krishna,

    removing the loop aspect of the Nectar Slider would take modding in a couple places.

    1. In the nectar-slider.js file located in the js folder, delete this section: 

    //play video user is hovering over
    $('.swiper-slide').mouseover(function(){
    	if($(this).find('video').length > 0 && $(this).find('video').get(0).paused == true && $animating == false){
    	     $(this).find('video').get(0).play();
    	}
    });

    and in the functions.php file search for this line:

    <video class="slider-video" width="1800" height="700" '.$poster_markup.' controls="controls" preload="auto" loop autoplay>';

    and change it to

    <video class="slider-video" width="1800" height="700" '.$poster_markup.' controls="controls" preload="auto" autoplay>';

    Cheers :)

  • Tobias replied

    Hi

    Sorry I have tried to implement this but my video still loops? Any ideas?

    earl-productions.com/beta2/

    Thanks

    Toby

  •  8,840
    Tahir replied

    Hey Tobias!

    I believe this ticket refers to an old version of the theme therefore it wont work. We are currently working on an update that would fix all the video issues. 

    Thank you for your patience.

    Cheers


    ThemeNectar Support Team 

  • Tobias replied

    Hi Tahir

    Sorry, just to clarify, the looping of the nectar video slide is an ongoing issue for now?

    Thanks

  •  8,840
    Tahir replied

    Hey Tobias!

    For now you can not stop the video from looping. As Suggested in earlier threads if you really need fine grain control over your sliders we would recommend getting the Revolution Slider.

    Thanks


    ThemeNectar Support Team 

  • Tobias replied

    Thanks for the fast replies as usual!

    I have one last question on this topic. I tested an alternative, putting an image to the homepage to come in after the video, in hope it would allow the video to play once but when the video finishes you can only manually go to the second slide and it continues the video loop. Is there a way around this or is this also an issue you are working on?

    Thanks again!

  •  8,840
    Tahir replied

    Hey Tobias!

    Some issues were reported with the slider and we are working on it. 

    Thank you for your patience. 

    Cheers


    ThemeNectar Support Team 

  • Tobias replied

    Hi

    I was wondering, is there as way to add an image as the first slider and a video to the second setting a autorate and having the video play its full length before looping. Currently if you have 2 sides, say for example set to the homepage, and you give it an autorate of 6000, the first slide is an image and the second and video. It will automatically slide to the second, the video but it won't allow the video to play its duration and will move back on the autorate and autoloop after 6000 back to the first slide. Anyway that video / second slide play its duration? I guess to be able to set an autorate but to stop autoloop so the second autorate of 6 seconds doesn't take effect?

    Thanks

  •  8,840
    Tahir replied

    Hey Tobias!

    I am afraid you will have to use Third-party Premium Slider plugins to achieve this as its not possible within the theme functionality. 

    Thanks


    ThemeNectar Support Team 

  • [deleted] replied

    Hey Tobias,

    I also don't want the video to loop.
    Reading from above it seems that that is not possible.
    Shame!

    Why is there a option to loop the slider available?
    I get that it works with images...

    Would be nice if that could be controlled. Either by a check box or by editing some code.

    Thanx!

  •  8,840
    Tahir replied

    Hey Som!

    The Slider enhancements are on the wishlist, unfortunately we didnt get time for it in this update due to the addition of new features . If you need such control urgently you can try some of the premium sliders such as Revolution or Layer Slider . 

    Cheers


    ThemeNectar Support Team 

  • Francois replied

    Any update on stopping the video from looping in the nectar slider?

  •  8,840
    Tahir replied

    Hey Francois!

    I am afraid we still dont have that option available within Salient. 

    Thanks


    ThemeNectar Support Team 

  • Methon replied

    Hi, Is there still no fix for the video looping in the nectar slider?

  •  8,840
    Tahir replied

    Hey Methon!

    You can remove the autoloop variable in functions.php . See screenshot for ref: http://prntscr.com/52mtls  . 

    Thanks 


    ThemeNectar Support Team 

  • Methon replied

    Thanks, that worked. However, now every time my cursor hits the nectar slider/marquee area the video replays. Is it something with the full slide link just below the loop code...

    if($link_type == 'full_slide_link' && !empty($full_slide_link)) {

    $slider .= '<a href="'. $full_slide_link.'"> <span></span> </a>';

    }

  •  1,071
    ThemeNectar replied

    Hey! Have you opened the nectar-slider.js file located in the js folder and deleted this as well:

    //play video user is hovering over
    	$('body').on('mouseover','.swiper-slide', function(){
    		if($(this).find('video').length > 0 && $(this).find('video').get(0).paused == true && $animating == false){
    			$(this).find('video').get(0).play();
    		}
    	});