Solved

Continuous Music througout different pages

Posted on 2011-09-03
13
308 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 30

Assisted Solution

by:Marco Gasi
Marco Gasi earned 250 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
 
LVL 30

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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 30

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 108

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 82

Accepted Solution

by:
Dave Baldwin earned 250 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 108

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 30

Assisted Solution

by:Marco Gasi
Marco Gasi earned 250 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 your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

706 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now