General Question

HeNkiSdaBro's avatar

Create a media player for a web site that always runs even when navigating around

Asked by HeNkiSdaBro (392points) March 14th, 2008

Can anybody help me with finding a good media player I can install or use on a web site I am creating that will run always, even if I navigate around on the different pages. It should have controls for start and stop though. Thanks in advance!

Observing members: 0 Composing members: 0

11 Answers

sndfreQ's avatar

most of the ones I’ve seen that so this use flash and shockwave

HeNkiSdaBro's avatar

any tips on any media players I should consider?

Vincentt's avatar

Try Last.fm’s player, let it open in a pop-up. You can’t have such a persistent player without modifying your entire website to only pull XMLHttpRequests. It’s not the player that should be persistent, it’s the page, and individual parts need to refresh themselves (using e.g. AJAX).

Zaku's avatar

You could use Vincentt’s suggestion but with DHTML (e.g. JavaScript) rather than AJAX, or HTML frames to keep the media player in its own non-re-posting frame. With those methods, the media player wouldn’t matter. But QuickTime, Flash, or WMP all work (if the client has them installed).

Vincentt's avatar

@Zaku – what does the J in AJAX stand for? ;-)

Anyway, please don’t use frames, there a usability hazard, unaccessible and can trouble search engines and people in general that want to link to your pages.

HeNkiSdaBro's avatar

Thanks guys! Are there places I could get snippets of AJAX code to use, because I am not too literate in AJAX programming… I have seen some tutorials on the few Spry assets available inside Dreamweaver CS3, are those of any use to me maybe?

jasonjackson's avatar

You could modify your whole website to be AJAX-based, but another, potentially much easier approach would be to wrap the entire thing in a frameset.

Okay, so you have a default page named something like index.php, index.html, default.htm, default.aspx, etc, depending on how you implemented your site. I’ll just call it “index.php” from here in on, but substitute the correct name in your mind, ok?

Step 1 is to rename that default page to index2.php (but using whatever extension is appropriate). Change any links or redirects in other pages which used to refer to index.php to go to index2.php instead; if you used include files for your header & footer, this will be much easier.

Step 2: make a new default page, named index.php, which is a frameset; divide it into a thin (like 50px-tall) strip across the top to hold your media player, and let the rest be the container for your site (use height=”*”). Have it load your old default page (now named index2.php or whatever) by default.

Step 3: in the page loaded by the frame that’s the 50px-tall strip across the top, you can implement your media player however you like. I suggest Flash. You might try searching for a free or open source implementation first, especially if you don’t know Flash; I don’t have a link handy for you, but I’ve seen them here and there.

Now, as users browse your site in the lower frame, the upper frame containing your media player won’t be unloaded, and will continue to play.

One last tip: when your site contains links to other sites, you should use target=“_top” (unless you’re already using target=“_blank”), so that when users leave your site, your media player will disappear.

That’s actually quite a bit easier than modifying your whole site to use AJAX to retrieve every page’s content. If you haven’t gotten very far along in making your site, though, using AJAX probably won’t be as much of a hassle – though the AJAX requirement will likely prevent you from using ready-made bits of code like forum software, shopping carts, etc.

If using frame still sounds too complicated or too much work, though – just open your media player into a popup window. You’ll probably have to do that in response to a user click, not only because it’s friendlier that way, but because so many people run popup blockers these days that a huge percentage of your audience will never see the popup, unless it opens in direct response to clicking on a link or button.

HeNkiSdaBro's avatar

Thanks for an informative answer. I was also thinking of using a frameset at first but got disencouraged doing so by some members here. Why are framesets a bad idea?

And how can I easily create AJAX functionality? Do I need all the coding knowledge or can I use Dreamweaver and get some done? Anyone wanna hand out a crash course in AJAX?

Vincentt's avatar

As I said regarding frames(ets):
> Anyway, please don’t use frames, there a usability hazard, unaccessible and can trouble search engines and people in general that want to link to your pages.

Regarding AJAX: not sure, but if you need to update your whole site I suppose you’d need to learn it. Anyway, to get visibility to that question, you ought to post a new one :)

HeNkiSdaBro's avatar

Thank you will do!

kullervo's avatar

Just finished building http://videos.silicon.com and http://videos.cnet.co.uk. Using ajax the video player keeps running even when you navigate through the different tabs, do searches etc.

You could use frames to do it on your site but it is not a good idea – they are depreciated and will invalidate your page but it is the easiest solution. Ajax is a better solution but if you have to ajaxify you whole site it could be a lot of work and it’s bad for SEO (you can counter this with a good index/sitemap page).

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther