Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 319
  • Last Modified:

Continuous Music througout different pages

I am trying to find a way to play continuous music throughout different pages so when a user navigates to different page the music continues to play or does not if the user has stopped it.

I know this can be done if all pages are loaded via an iframe but this would mean that the site is essentially one page which is no good. This can also be achieved if the website is built entirely using Flash but again I don't want to go down that route. Also, a pop out play would not look good so I want to stay away from that.

Is there any other way? using PHP perhaps?


(And I know music is never a good idea and people's speakers might be turned up or one persons taste is not anothers and so on but this needs to be done in this case!)
0
BrighteyesDesign
Asked:
BrighteyesDesign
  • 4
  • 3
  • 3
  • +2
3 Solutions
 
Marco GasiFreelancerCommented:
No Php dowsn't this type of things. Simply use frames: create a frame and in that frame you play music and load all pages.

Cheers
0
 
lamaslanyCommented:
I would have suggested looking at Ajax but I'm not sure what your objection to 'one-page' is based on...  
0
 
BrighteyesDesignAuthor Commented:
Thanks for getting back...

I may have misunderstood the iframe route.

If I create one page (index.html) and load all of the pages within an iframe will search engines still recognise all of the other pages or just see the site as one page (index.html).

If that's the case my objection would be SEO.
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
Marco GasiFreelancerCommented:
I'm sorry: I read only title of your question :-( Your objection against iframe is correct. Search engines don't love iframes...

I don't understand how Ajax could help here: every time a new page is loaded, ajax call should be performed again and again and music would start anytime by the start: there would not be a continous 'sound carpet'.

Php can't do anything here: it's a server-side language and music sounds in the client-side.

I fear you have no choice. Can you explain why you need this continous music?
0
 
lamaslanyCommented:
I see. then you probably want to avoid iFrames.

Even if you had a player that would auto-resume from the last position in the music when loading a new page you'd still get a break in the music.

The only viable option I can think of is to invoke a second window the sole purpose of which would be to play the music.  
0
 
lamaslanyCommented:
My suggestion for using Ajax was based on the rejection of iFrames without knowing why iFrames were rejected.  Ajax would allow for sections of the page to be dynamically updated with content without requiring the page to be reloaded meaning it would be possible to browse content without a break in the audio.
0
 
Marco GasiFreelancerCommented:
Oh, sure, what a stupid I am!!! Ajax to load pages not to play music! lol I should have understood by myself!

You idea of a dedicated window is good, but i would fear that user close a secondary window he can understand...
0
 
Ray PaseurCommented:
Is there any SEO consideration involved?  If so, IFrame and AJAX solutions might need some special care.  I think i would probably opt for a "pop-under" window to play the music.

What if the client comes to a deep-linked page, other than the home page.  Should all pages play music, or would it be OK if just the home page started the music?
0
 
Dave BaldwinFixer of ProblemsCommented:
Every site that I've seen that plays continuous music uses frames and puts the music player in a slice at the top or bottom.  Use Google Sitemaps to get around the 'SEO' problem and make sure Google knows about the pages.
0
 
Ray PaseurCommented:
@DaveBaldwin:  I agree 100% with your post at ID:36478365. ~Ray
0
 
BrighteyesDesignAuthor Commented:
Thanks for responses.

I have set the site up using two iframes (one for content and one for music).

This works great for me (on a mac using FF, Safari and also IE via virtual PC) but my client is seeing white backgrounds any idea why this could be?

The correct background which you'll see on the link below is part of the body tag on the holding page.

http://www.riad-hikaya.com/index3.html

And example of one of the pages viewed within the iframe is http://www.riad-hikaya.com/rooms.html

Are there any IE problems with iframes that cold be causing this?
0
 
Marco GasiFreelancerCommented:
I saw the problem using IE8. I cnovalidated your page with W3C (I used Tools->Developer tools) and it returs two errors: it saysthat scrolling property of iframe cannot be "N0" (capitalized) but "no".
I don't know if this stupid thing can compromise your page (you have many css, jquery css, dreamweaver css), but IE is a stupid browser... Trying is free :-)
0
 
BrighteyesDesignAuthor Commented:
Cheers all,

It actually turned out that I needed to add ALLOWTRANSPARENCY="true" to the iframe code to allow (the poor excuse for a browser) IE8 to work!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

  • 4
  • 3
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now