Grow your CSS skills. Land your dream job.

Anythingslider with embedded videos – loading twice

  • # May 6, 2012 at 9:45 pm

    Hi all,

    First of all thank you very much for any support you might lend in this issue.

    I am not a coder, I designed my site on photoshop and hired a web developer to create it for me. We use the Anythingslider to show embedded Vimeo videos. When loading the page for the first time, the video appears, then disappears and appears again, almost like it is loading twice. Here it is:

    **url removed by request**

    Would anyone have any advice as to what might be causing this problem? I will most likely not understand but I will pass the information onto my web developer, so please be as technical as necessary.

    Thanks so much.

    # May 7, 2012 at 9:07 pm

    We have put many hours into trying to solve this issue and not able to come up with an answer. Anyone seen this issue before or able to steer us in the right direction?

    Thanks.

    # May 7, 2012 at 9:48 pm

    There’s a few things that could be the cause of this:

    – the AnythingSlider code is being triggered using a setTimeout function with a value of 1000 (meaning it will load with a delay of 1 second)
    – the page loads not one, not two, but THREE jQuery libraries (versions 1.6.2, 1.6.4 and 1.7.1)
    – javascript calls all over the place (header, middle of the body, at the end of the body)

    My advice to the web developer would be to clean up things, big time.

    # May 7, 2012 at 11:01 pm

    Well, the issue is actually that the video extension is triggered on the window load event, which is why you see it load, then reload.

    The video extension really needs to be rewritten, but I just haven’t had the time or the motivation to get it done. But, I think the easiest solution would be to modify the video extension slightly….

    First remove the following code from the end of the file:

    // Initialize video extension automatically
    jQuery(window).load(function(){
    jQuery('.anythingBase').anythingSliderVideo();
    });

    Then add the following to the AnythingSlider initialization code:

    $('#slider').anythingSlider({
    onInitialized : function(e, slider) {
    slider.$el.anythingSliderVideo();
    }
    });

    This will initialize the video extension immediately after the slider has set itself up and likely before the page has completely loading.

    # May 8, 2012 at 7:38 am

    @Mottie due to the messy structure, I didn’t even notice that, go figure! ;)

    # May 8, 2012 at 5:47 pm

    @Senff LOL since I wrote the video extension and know the problems, I didn’t bother going to look at the site ;P

    # May 11, 2012 at 4:30 pm

    Guys thank you very much for all your help. I’ve not been able to get online for a few days so I apologise for the delayed response. I designed my website (very simple i know) on photoshop, and then hired a web developer to code the site for me. I had many problems with that web developer so in the end we parted ways and I hired a new web developer to continue/finish the job. Since my coding knowledge is extremely limited I cannot fix the messy structure myself, but even I can tell by looking at the code that things are a mess, and have been asking my new web developer to work on these things. Hopefully he will be able to address those issues, I will come back and let you guys know if your solutions worked. Thanks so much.

    # May 16, 2012 at 6:38 pm

    Hi all. Mottie and Senff thank you so much for all your advice so far. I asked my web developer to clean up the code and to make the modifications that Mottie advised. Unfortunately the double loading problem is still present, and as I am not a coder I cannot verify if the code has been sufficiently cleaned up.

    Would anyone have any further suggestions or willing to take another look to see what might be causing the problem?

    Here is some more information:

    1. Firefox always double loads the video. Internet explorer sometimes does not.

    2. Using Firebug addon, i see the error ‘Permission denied for http://player.vimeo.com to get property Location.toString’ and ‘Permission denied for http://player.vimeo.com to call method Location.toString’. I am pretty sure this is a vimeo problem but could this be causing the issue?
    http://i1154.photobucket.com/albums/p533/sevghesh1/pic1.jpg

    Thank you in advance for any help you may lend in this matter.

    # August 18, 2012 at 12:23 am

    I’m getting this issue on my site as well and can’t see to fix it.

    on my testing server (http://www.bryankremkau.com/btc/)

    Could someone help me out with this, thanks!

    # August 18, 2012 at 9:32 am

    You know, I think it’s double loading the video because of cloned panels. If you set the “infiniteSlides” option to false, it should stop.

    # August 18, 2012 at 8:06 pm

    great, that fixed the problem!

    # August 29, 2012 at 3:57 pm

    Hmm I think the problem is happening again, this time on my live site http://www.beforetheconcert.com/

    I turned off infinite slides so not sure why it’s still loading twice

    # September 24, 2012 at 8:48 pm

    Same issue over here, I made the changes described above to no avail. It’s a lot more noticeable on Chrome and Firefox, then IE 8. Any other ideas? Site is [http://www.autohow2.com](http://www.autohow2.com “autohow2.com”) Thanks in advance!

    # January 22, 2013 at 8:53 am

    Still getting this issue over at http://www.beforetheconcert.com, not sure how to fix the double loading…

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".