Okay
  Public Ticket #431573
Video being loaded twice?
Closed

Comments

  • Jesse started the conversation

    Do you know why this video is being loaded twice?

  •  1,075
    ThemeNectar replied

    Hey Jesse,

    Try removing this section from the nectar-slider.js file located in the js folder
    //webkit looped slider first video fix
        		 if(navigator.userAgent.indexOf(\'Chrome\') > 0) { 
        		 	 if( jQuery(this).find(\'.swiper-slide:nth-child(2) video\').length > 0 && jQuery(this).find(\'.swiper-container\').attr(\'data-loop\') == \'true\') {
    
        			  	var webmSource = jQuery(this).find(\'.swiper-slide:nth-child(2) video source[type=\"video/webm\"]\').attr(\'src\') + \"?id=\"+Math.ceil(Math.random()*10000);
        	          	var firstVideo = jQuery(this).find(\'.swiper-slide:nth-child(2) video\').get(0);
        	          	firstVideo.src = webmSource;
        	          	firstVideo.load();
        	          	
        	          	var webmSource2 = jQuery(this).find(\'.swiper-slide:last-child video source[type=\"video/webm\"]\').attr(\'src\') + \"?id=\"+Math.ceil(Math.random()*10000);
        	          	var lastVideo = jQuery(this).find(\'.swiper-slide:last-child video\').get(0);
        	          	lastVideo.src = webmSource2;
        	          	lastVideo.load();
        	         }
    
                     if( jQuery(this).find(\'.swiper-slide:eq(-2) video\').length > 0 && jQuery(this).find(\'.swiper-container\').attr(\'data-loop\') == \'true\') {
    
                        var webmSource = jQuery(this).find(\'.swiper-slide:eq(-2) video source[type=\"video/webm\"]\').attr(\'src\') + \"?id=\"+Math.ceil(Math.random()*10000);
                        var firstVideo = jQuery(this).find(\'.swiper-slide:eq(-2) video\').get(0);
                        firstVideo.src = webmSource;
                        firstVideo.load();
                        
                        var webmSource2 = jQuery(this).find(\'.swiper-slide:nth-child(1) video source[type=\"video/webm\"]\').attr(\'src\') + \"?id=\"+Math.ceil(Math.random()*10000);
                        var lastVideo = jQuery(this).find(\'.swiper-slide:nth-child(1) video\').get(0);
                        lastVideo.src = webmSource2;
                        lastVideo.load();
                     }
        		 }
    

    Cheers