views:

28

answers:

0

I have a music site that uses a flash program to play music. When a song is done playing, the flash program uses getUrl to call a JavaScript (jquery) function that reloads part of the page using AJAX. It reloads the part of the page where the flash player is, which then selects and starts the next song.

Everything works fine in IE and Chrome. However, in FireFox the new song will not actually start playing until the page is active and visible on the screen. That means that the flash player will not start playing the music unless the window or tab is right in front of the user. If the user happens to have another window or tab active, no music will play until the user switches back to the window or tab with my site in it, and then the music will start playing immediately. I've also noticed that the other AJAX-loaded content will suddenly "flash" onto the screen and replace the old content right when you switch back to the site. As far as I can tell, the new content (song file, images, text) is already downloaded on the client-side, but will not actually load until the page is visible. I want the music to play continuously even when the users do not have the site right in front of them.

Any ideas?