CSS-Tricks / AnythingSlider

A jQuery Slider plugin for anything.
http://css-tricks.github.io/AnythingSlider/
GNU Lesser General Public License v3.0
1.15k stars 380 forks source link

Images & video slideshow, if the first slide is an image, the time doesn't work the first time #534

Closed Vitoko closed 11 years ago

Vitoko commented 11 years ago

Hi again!

i have this issue: when i load an image in the first place, (then videos or images, it doesn't matter), the time of the first image is not work. (it shows during let say 1 - 2 seconds, and the real time of the image is 20).

The second time that shows the image, his time is correct.

i don't know whats going on..

Thanks Mottie for helping me again..

I think the problem may be over here:

        var playvid = function(slider) {
            var vid = slider.$currentPage.find('video');
            if (vid.length) {
                // autoplay
                vid[0].play();
            }
        };
            // pause video when out of view
            onSlideInit: function(e, slider) {
                var vid = slider.$lastPage.find('video');
                if (vid.length && typeof(vid[0].pause) !== 'undefined') {
                    vid[0].pause();
                }
            },

if the image is not in the first place. everything is ok.

Mottie commented 11 years ago

Hi @Vitoko!

Sorry the code above doesn't help. If the first slide is an image, then it has nothing to do with the video extension.

I'm not sure what to say about the 20 or so seconds the slider stays on the first image. To me it sounds like a combination of page loading time and maybe a slideshow delay?

Please share your AnythingSlider initialization settings, or a demo of this issue so I can help you better.

Vitoko commented 11 years ago

Hi @Mottie, here is the demo: http://www.muralelectronico.cl/sistema/show.php?idC=30&clave=123456

if you can see, the first slide is an image with a delay time of 20 seconds.. and a video with a minute and a half . (more or less) so, the image is not during correctly the first time slideshow loads.. but the other times, i think everything is ok... (sorry my english)

i modify a lot of isVideoPlaying but i don't think that is the problem..

Mottie commented 11 years ago

I'm guessing this issue has been resolved. If not, please feel free to post a message here for me to reopen it and I will try to assist you further.