PDA

View Full Version : Preloading Music Files



CoBikeRider
02-21-2005, 05:08 PM
I am looking for a method to preload a music file (eg mp3) so I can synchronize JavaScript events to occur at given times as the music is played.

By using HTML <BGSOUND> I don't know when the music file is downloaded and has started playing - BGSOUND doesn't have a "complete" property like IMG does. I tried the startdownload method and I can see the file downloading. And it will also trigger a call back that I can test. However, the content of the music file is not accesible/usable. Am I missing something here?

In summary does anyone know how I can determine when a sound file has started playing?