how to preload more than one but not all images of a slideshow with jquery

Posted by wtip on Stack Overflow See other posts from Stack Overflow or by wtip
Published on 2009-06-13T14:50:49Z Indexed on 2010/03/30 20:03 UTC
Read the original article Hit count: 455

Filed under:
|
|
|

I'd like to create a web based stop motion video player. Basically a slideshow that shows 2-4 images per second. Each image might be a maximum of 20KB. I don't want to preload all images in the slideshow as there might be thousands, however I need to preload more than just the next image in the show as this will not playback fast enough (because of the playback speed the browser needs to be loading more than one image at a time).

I've been looking at using the jQuery Cycle Plugin (http://malsup.com/jquery/cycle/) with a addSlide type function but don't know how to make it work.

Would something like this might work? -Slideshow starts -image is played back -preloader will attempt to load up to the next 60 images -playback will wait for the next image in line to completely load, but will not wait for all 59 others.

The playback / preloading order is important for this application.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery