Question

I am developing a web app that is similar to an online version of power point. What I want to do is preload the previous and next slide while the user is viewing the current slide so that there is very little lag when clicking previous and next.

Each slide has the jwplayer on it to play audio that goes along with the slide. At this point I have javascript variables that act as a buffer and holds the html for the previous and next slides. When the user clicks next I use jquery to replace the html currently displaying with the html in the buffer variable. At this point the jwplayer is created and the audio begins to buffer and then play. I would like to be able to buffer the audio when I put the html in the buffer. Is there a way to do that using javascript?

Was it helpful?

Solution

Instead of caching the slides html source, actually embed their HTML into the page, but in an invisible div. When the user wants to see the next slide, make the old one invisible and the new one visible.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top