Run mp3 in background and switch pages without stopping it

i am running mp3 in background and when i switch pages of site it stops and start again on next page. what should i do(through PHP) to play it continously?

thankyou

Not really possible… If I were you, I’d look at setting up a simple AJAX body. This will allow you to load in a new body section (a new page of content) without actually leaving the current page.

Once you create a new HTTP request, your going to have an interruption in your music.

EDIT: Probably not very SEO friendly, another other suggestions?

ya i was also thinking this only…btw thanks wolfe :slight_smile:

It’s technically possible with the dreaded iframe.

Or … don’t play an MP3. :wink:

Unless the website is a music site or for a band/artist then having background music is annoying.

nope… still annoying.

Although on a band website the play button should be very obvious, Even here it shouldn’t start until the user asks it to.

It could be done with backbonejs or similar javascript MVC framework, but that would probably require to rewrite whole application. On the other hand having background music on the site is not the best practice.

PHP does not deal with audio players, flash players, ajax, css, html, or any type of players or client side language. AJAX being partly server-side, but it is a different language set altogether.