Background music revisited

OK, how to do it correctly

Page 1 of 1

5 Replies - 4101 Views - Last Post: 26 January 2006 - 05:34 PM

#1 1lacca  Icon User is offline

  • code.rascal
  • member icon

Reputation: 44
  • View blog
  • Posts: 3,822
  • Joined: 11-August 05

Background music revisited

Posted 09 January 2006 - 02:30 PM

OK, I hate music on webpages, they always start up so loud that I almost get a heartattack especially at night, but I am making a site for a friend and he wants it badly. So what is the best way to do it? My main concerns are:
1) stop / pause
2) adjustable volume
3) continuous play while changing pages

These pretty much eliminate music in CSS, so I have coded a little flash app to play a few tracks fulfilling #1,2. And here comes my current problem: #3. So far I have come up with two solutions:
- popup for the player, cons: it might be blocked, etc.
- frames: one for the player and one for the site, cons: its ugly, no way to eliminate border between them in a validating way (at least this is what I've read, but I am not an expert with frames), and navigation / bookmarks might not work as expected by some (well, this latter can be taken care of by javascript - mostly)
Which one would you recommend and why? Any new solutions are welcomed, too.

I've almost forgotten: the site is xhtml 1.0 strict.

Is This A Good Question/Topic? 0
  • +

Replies To: Background music revisited

#2 Arbitrator  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 51
  • View blog
  • Posts: 530
  • Joined: 26-January 05

Re: Background music revisited

Posted 15 January 2006 - 01:28 PM

I'm not sure if the <iframe> qualifies, but you could create a webpage that can be entirely navigated through an iframe and have the music on the page hosting the iframe. You can also make the website entirely Flash-based so that the user stays on one page the entire visit.
Was This Post Helpful? 0
  • +
  • -

#3 1lacca  Icon User is offline

  • code.rascal
  • member icon

Reputation: 44
  • View blog
  • Posts: 3,822
  • Joined: 11-August 05

Re: Background music revisited

Posted 17 January 2006 - 07:32 AM

Thank you Arbitrator for your thoughts, I didn't think about iframes!
Unfortunately things got a bit more weird. Looks-like my page is not a big fan of Infernal Exploder, because as soon as I insert it into a frame (or iframe) IE starts eating processor at 99%, and gets hardly responsive - even if I put a blank page into the other frame, and give it 0 size. No such problems with gecko :P Strange as it is, (i)frames are ruled out now.
Homepages created entirely in flash can confuse many users and reduce usabilty significantly (no context menu, can't bookmark individual pages, problems with screenreaders, etc.) In some cases it doesn't pose any problems, but unfortunately regarding this project these are key factors.
So looks-like I'll go with the popup (sounds stupid), maybe doing some PHP browser sniffing and serving the frame based solution for more able browser.
Was This Post Helpful? 0
  • +
  • -

#4 atlcrunkshawty  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 20-January 06

Re: Background music revisited

Posted 21 January 2006 - 12:48 AM

First of all I'm new to this site so yes this is my first post lol. Anyways, I'm not sure what your purpose for having music on the page is, but I have created a page for a musical artists' site and used this. Basically you can upload files to whatever server you want. Then create a playlist of those songs and pass it to the player. You can then embed that player on your page using HTML. The link I gave you basically does all the work you just tell it where your playlist is located and choose a few options and it gives you the code. If you could get iframes working it would definitely work for you. If not I'm not sure how you would implement it to achieve what you want but this would prevent you from having to create a flash player lol. If you can't get frames to work, I'd probably just go with a popup player and maybe just have a some text warning/advising stating if they want the music they may need to allow popups from the site. Just my thoughts..may not be much haha. I'm sure you have a lot more experience than me as well. Best of luck.

This post has been edited by atlcrunkshawty: 21 January 2006 - 12:49 AM

Was This Post Helpful? 0
  • +
  • -

#5 1lacca  Icon User is offline

  • code.rascal
  • member icon

Reputation: 44
  • View blog
  • Posts: 3,822
  • Joined: 11-August 05

Re: Background music revisited

Posted 21 January 2006 - 03:57 AM

Welcome to DIC atlcrunkshawty,

Thank you for the link, its really useful! You should post it in the resource section for some dream kudos! Unforutanetly I'm already done with my flashplayer :(
Anyway, as frames and iframes are still behaving strange in explorer, looks-like my only way out is going with popups...
Was This Post Helpful? 0
  • +
  • -

#6 1lacca  Icon User is offline

  • code.rascal
  • member icon

Reputation: 44
  • View blog
  • Posts: 3,822
  • Joined: 11-August 05

Re: Background music revisited

Posted 26 January 2006 - 05:34 PM

Well, if anyone interested, I've come up with a new solution:
I've modified my flash audioplayer so that it can take 4 arguments from the embedding tag as flashvariables: if playing enabled, song id, frame id(progress), volume.
So at startup it initializes itself from the variables that are present, and it sends (like every 100th frame played) its status to the browser, where a javascript method stores it. And when a link is clicked, a javascript function adds the status to the url - if javascript is not enabled then I think I'm gonna halt the music as well. The next page checks the url for player status and if it finds it, then it is passed to the embedding tag again.
Clean as that, so far it works, the only problem is the little pause each time a new page is loading, but due to the other limiting factors I think its still a good tradeoff and I can forget about frames, sluggish ie, browser dependent solutions and popup blockers...
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1