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
| SitePoint Sponsor |
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?
<?php//Kyle Wolfeecho devBlog("My Dev Notes");
ya i was also thinking this only...btw thanks wolfe![]()
It's technically possible with the dreaded iframe.
Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.





Or ... don't play an MP3.
Unless the website is a music site or for a band/artist then having background music is annoying.
nope… still annoying.Originally Posted by siteguru
The only code I hate more than my own is everyone else's.





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.
Bookmarks