Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Continuous Music througout different pages

Posted on 2011-09-03
13
Medium Priority
?
317 Views
Last Modified: 2012-05-12
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
Comment
Question by:BrighteyesDesign
  • 4
  • 3
  • 3
  • +2
13 Comments
 
LVL 31

Assisted Solution

by:Marco Gasi
Marco Gasi earned 1000 total points
ID: 36477831
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
 
LVL 19

Expert Comment

by:lamaslany
ID: 36477845
I would have suggested looking at Ajax but I'm not sure what your objection to 'one-page' is based on...  
0
 

Author Comment

by:BrighteyesDesign
ID: 36477857
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 31

Expert Comment

by:Marco Gasi
ID: 36477873
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
 
LVL 19

Expert Comment

by:lamaslany
ID: 36477875
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
 
LVL 19

Expert Comment

by:lamaslany
ID: 36477879
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
 
LVL 31

Expert Comment

by:Marco Gasi
ID: 36477890
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
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 36478052
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
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 1000 total points
ID: 36478365
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
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 36479117
@DaveBaldwin:  I agree 100% with your post at ID:36478365. ~Ray
0
 

Author Comment

by:BrighteyesDesign
ID: 36483196
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
 
LVL 31

Assisted Solution

by:Marco Gasi
Marco Gasi earned 1000 total points
ID: 36484027
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
 

Author Comment

by:BrighteyesDesign
ID: 36485118
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

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question