I was facing an issue when I play a video in flexslider and change the video and come back to the tab the video is playing in the background and the slider is rotating in the foreground.
I have implemented before method and issue got resolved (Thanks for exposing before method).
Now I am facing a weird problem, when I am playing the same video in two different tabs then it is not working. For 2nd tab, the before events doesn't get triggered.
My code:
// Added before event to flex slider to resolve video issue.
before: function(slider){
slider.animateSlides = function (){
var focused ='true';
if($( "li" ).hasClass( "slide-video-open" ))
{
focused = '';
}
if(slider.animate && focused)
{
slider.flexAnimate(slider.getTarget("next"), true);
}
};
}
Hi Contributors,
I was facing an issue when I play a video in flexslider and change the video and come back to the tab the video is playing in the background and the slider is rotating in the foreground.
I have implemented before method and issue got resolved (Thanks for exposing before method).
Now I am facing a weird problem, when I am playing the same video in two different tabs then it is not working. For 2nd tab, the before events doesn't get triggered.
My code:
// Added before event to flex slider to resolve video issue. before: function(slider){ slider.animateSlides = function (){ var focused ='true'; if($( "li" ).hasClass( "slide-video-open" )) { focused = ''; } if(slider.animate && focused) { slider.flexAnimate(slider.getTarget("next"), true); } }; }
Please help me on this.