I need to embed some MP3 files into my website ( http://www.rpwsj.com : podcast/talk show). I would like to have them preloaded for performance reasons, but it needs to be done sequentially not all at once to be nice to the user's bandwidth. What I need is to be able to start preloading the next immediately after the previous one has completed. How can I determine when one embedded MP3 has finished downloading so that I can have the page start the next one? Is there some other way of doing this? Thanks in advance!
Hi, You could try maybe something like: <script> setTimeout(functiontoloadmp3(), 300000); </script> 300000 is 5 minutes, 1 second is 1000. This function uses milliseconds. I am not sure how you are loading the mp3s, in a seperate page for each one or whatever, but you could easily add the play length of each mp3 to this function. Not sure how many mp3s you are talking about either. It would be ok for a few, but I wouldnt want to do it manually for 100 or so. Lemme know if this helps, Mike
MWilson, Thanks for replying and offering a solution. Currently what I am doing is a 10-second delay before the next download is started. As for how I am doing it at the website, visit it and you'll get the idea. All on one page, the homepage. The idea is to download them for the visitor, play the first one (the "Introduction" episode), and let them select what to listen to next. Currently, there are 21 episodes. However, time staggering the downloads isn't the solution sought. I am doing that now. What I am hoping is that there might be a way to tell when a download is completed for a visitor to start up the next download. Then those with different Internet speeds are progressing through the downloads as quickly as they can one at a time.
if your getting a ten sec delay most likely cause the browser is not reading the code fast enough to have it start right away. Try moving the code up on the page or use the html code It works very good.