views:

102

answers:

2

I'm doing some work on a site that let's users create their own mini-sites. My client wants users to be able to upload music and have it continuously play as visitors navigate the site. The only good way I can think of doing this is an Iframe, but obviously that will than get rid of unique URLs. I also don't want to use Ajax or a cookie to track the song's progress.
I was thinking maybe there was a way to have a popup player that closed simultaneously when the user exited the site?

Any suggestions would be greatly appreciated.

A: 

Pop-ups are difficult because of pop-up blockers and the reduced usability (additional window in user's task bar etc.) IFrames suck for the reasons you mention.

I think preventing page reloads by loading page contents through unobtrusive Ajax (With the menu items containing traditional links if JS is turned off) is the nicest solution:

You have a menu consisting of <a> links to normal pages:

www.domain.com/pagename.php 

but there's a click event on every link that, when fired, loads pagename.php into a content container through AJAX. It also sets the browser address bar to

www.domain.com/index.php#pagename

which, when opened, will translate to the index page opening, and loading pagename through AJAX (Will work for JS-enabled browsers only of course.)

This would require a fundamental re-work of your sites' structure though.

Pekka
Yeah, this seems to be the best route to take. Although none seem to be great options.
Tom Boxer
@Tom nope, there are no great options here (I've examined the issue several times in the past, including "almost seamless" MP3 players trying to continuosly play across page switches, none of which quite worked out.)
Pekka
A: 

There's a module of script.aculo.us called sound.js, docs, is prototype/script.aculo.us based but you can easily port it to jQuery

clyfe
But that won't sort the main problem of continuous playback when switching pages, would it? Or am I overlooking something?
Pekka
It, won't. It's either frames/ajax/extra window, now way around it. (Sorry, didn't read title good enough).
clyfe