Page 1 of 1
[Solved]Best way to have continuous music on website
Posted: Mon Sep 30, 2013 4:05 am
by jasnick
Old and valued client insists on having continuous music on his website, just the one track, that keeps going if the page is changed. He has a very specialised type of user so I really think this won't be an off-putting issue for them.
I have extracted the audio from a YouTube video and have saved it as a .wav and also an .mp3.
I have spent a couple of days researching the best way to do this and am quite confused with all the talk of frames and so on. Some say to put it in a pop-up. I also read that if these are not turned off they keep playing after someone has left the site.
Have looked at a couple of CMSMS modules but they are far too complicated for what is required.
Has anyone done this before and can recommend the way to go?
Thanks
Re: Best way to have continuous music on website
Posted: Mon Sep 30, 2013 1:56 pm
by velden
I think you will be stuck with:
- Ajax driven website -> complex
- popup -> easy
- frames -> easy, but don't know if frames are still the way the way to go
Popup indeed needs to be closed for the music to stop playing (perhaps you can write some javascript to check for visitors leaving the page).
Ajax driven website is far more complex, and if SEO is important it needs extra work.
So maybe, depending on budget and knowledge, frames is the way to go.
But if you think it can be done another way look at how some large websites do it.
Re: Best way to have continuous music on website
Posted: Mon Sep 30, 2013 11:55 pm
by jasnick
Thanks velden - yesterday I came across a site that offers a continuous music template that is very low cost:
Easy to add.
Plays standard mp3 or wav files.
Works on any website or template.
Step by step instructions are included.
Includes browser detection and HTML5 plus fallback code.
Other players can be added to replace the HTML5 player code.
You will need to add only one line of code to your existing webpages.
Uses dynamic Javascript to create the player frame.
Can be used for an audio mp3 message or mp3 music.
Soundframe will not make a site a "framed" site.
Includes open on click and autostart option.
Frame/player height is editable.
Tested in all newer web browsers.
Sounds as if it would do the job.
Re: Best way to have continuous music on website
Posted: Tue Oct 01, 2013 12:00 am
by calguy1000
Sure, that's always an option... open a popup/invisible div that points to an external site.
Re: Best way to have continuous music on website
Posted: Tue Oct 01, 2013 12:10 am
by jasnick
Thanks calguy1000 - I'm only doing it because he's been a great client over a number of years

Re: [Solved]Best way to have continuous music on website
Posted: Tue Oct 01, 2013 12:22 am
by calguy1000
Just remind your client that auto-playing music (and particularly not allowing your users to easily and quickly kill it with a VERY LARGE button) is evil.
here's a nice blog article on the topic:
http://www.zigpress.com/2009/10/30/10-r ... lay-music/
I can state with 100% certainty that everybody I know HATES sites that auto play music. Even if I like the music, it interferes with whatever else I'm listening too (TV, podcasts, stereo, telephone, or even the occasional live person I'm talking to). I certainly don't revisit those sites.
As a good business decision, your client should rethink playing audio unless the user asks it to play. re-design if necessary.
I would consider auto-playing audio to be like an offensive radio or print advertisement: will do more harm than good. and certainly will eliminate the benefits associated with a good website re-design.
Re: [Solved]Best way to have continuous music on website
Posted: Tue Oct 01, 2013 12:39 am
by jasnick
I agree with you 100% -

I've tried every argument under the sun to dissuade him but he is adamant. The template I am going to buy has options to make it only playable onclick and a turn-off button.
Re: [Solved]Best way to have continuous music on website
Posted: Fri Oct 04, 2013 2:05 am
by jasnick
Follow-up: have installed the template for continuous music. Had a few issues to start but the developer sent me an updated version and it works perfectly in all major browsers.There are start and stop icons. However, the client wants it to autostart. NOTHING I have said about this makes any difference to him.
In discussing it with the developer, we came to the conclusion it will not work on a CMS site. It was designed for html pages. He is going to send me large stop/start icons to make it more "in your face".
Client states " The music is a selling tool almost all our clients aren't clever enough to turn on the music so it needs to be in their faces from the start."
Although they say it is not a frame site, it does have frames and I can't entitle the pages to reflect the actual page the user is on, though they say a page can still be bookmarked. I would have hoped that I could use {page_alias} somehow on the frame pages but I can't see how.
If anyone want to have a look, the site is [edited].
Thanks
Re: [Solved]Best way to have continuous music on website
Posted: Fri Oct 04, 2013 11:08 am
by velden
In discussing it with the developer, we came to the conclusion it will not work on a CMS site. It was designed for html pages.
Nonsense. CMSMS spits out html pages.
most simple solution would be a little javascript code to call the 'OpenSoundFrame()' function on page ready.
Re: [Solved]Best way to have continuous music on website
Posted: Sat Oct 05, 2013 3:16 am
by jasnick
Hi veldon
Thanks for reply.
Yes I see what you mean but the instuctions I was given are as follows:
Sound frame autostart:
If you would like the music to start when your website homepage loads:
Make a copy of your homepage, usually the "index.html". Name it "index2.html". ( I copied "home" and called it "index2".Just to test)
In your homepage (index.html) add this code to the "BODY" tag:
OnLoad="javascript:AutoSoundFrame();"
Be sure NOT to add this to the "index2.html" or your page will loop load.
Optionally, instead of using the "OnLoad" in the "body" tag you can add the following script code in the head section of your webpage: (I did this)
<__script__ type="text/javascript">
<!-- start script
window.onload = function()
{
AutoSoundFrame();
};
//-->
</__script>
Edit the "var soundframe" in the "sound_frame.js" in the "sound_frame" folder to "auto" instead of "normal". The template will now open the frameset with the first sound page (song-1.htm) and your website homepage when your site first loads.
Not unexpectedly, I got an error message: The requested URL /index2.html was not found on this server.
Have never used frames. I can see in the files mentioned the instances of index2.html but have no idea what to replace it with.
I've reverted back to as it was so I can leave the site online.
Re: [Solved]Best way to have continuous music on website
Posted: Sat Oct 05, 2013 8:19 pm
by rotezecke
If the website is not too large, you could have a single page only. This may not be suitable for you, but if anyone else ever stumbles upon this thread. this way you dont need frames or popups, and the music wont reset on click because you stay on the same page.
i believe some single page examples are found in CMSMS Show Off Forum
http://forum.cmsmadesimple.org/viewforum.php?f=5
single page website (front end) may need a bit more planning but can still be user friendly (for editing).
Re: [Solved]Best way to have continuous music on website
Posted: Sun Oct 06, 2013 1:38 am
by jasnick
Thanks rotezecke
Yes I came across the single page idea in my research but doubt if I could adapt that to this site. For a small site, yes, it would be great.
Re: [Solved]Best way to have continuous music on website
Posted: Thu Nov 21, 2013 9:41 pm
by gocreative
You may have already solved this, but just a thought: What if you attempt to capture the current time on the audio track, store it in a session or cookie variable, then on each page load, restart the audio from that point? It wouldn't be a seamless transition but it might be relatively simple to achieve.
Re: [Solved]Best way to have continuous music on website
Posted: Thu Nov 21, 2013 11:16 pm
by jasnick
gocreative - thanks - this was quite a complicated site with varying templates and stylesheets - it had to look good on mobile phones etc - so in the end I settled for using the template for continuous music in a frame with a stop/start button. Dr.CSS helped with making the site responsive. Positively the last site I will do with music continuous or not
