• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Background Music in Joomla?

Dan

Bullah
NLC
Ok.

I may have a chance of getting a job doing a site for a local Festival organisation and it needs to be Joomla!
The people currently have a site with background music that plays when you visit the site. I need to be able to do this in Joomla! but without the player being visible.

Any ideas?
 
Easiest way would probably be an invisible iFrame, it's not pretty but it'd do.

Stick it at the bottom, that way when users navigate the site it doesn't load. The prettier way would be to customize the site to have the music in the header and the rest of the site is loaded via ajax XMLHTTPREQUEST or something similar that doesn't refresh the music.

There's also popunders, a flash-output (very difficult since you'd basically have to code a bridge from Joomla to Flash).

If it doesn't matter if the music reloads when they navigate to a new link..then you just stick it in a div and set the display property to none (making it invisible)

Code:
<div style="display:none;"><embed src="blah" /></div>

You get the idea..
 
Last edited:
Ok I put the code in above the </body> tag but it won't play. It's an MP3.
Any ideas?
 
What's the code you're using? I think you don't have it on autoplay. I'll look at it, but it's hard to tell if I don't know how you're implementing it.

You could try this: http://www.boutell.com/newfaq/creating/audio.html

Which also has this in it, if you're using an embed link to embed an mp3, add the following the <embed> parameters: autostart="true" so it will look like this:

Code:
<embed autostart="true" />

Obviously with all the other parameters as well.
 
Last edited:
Code:
<div style="display:none;">
<embed src="yourbgmusic.mp3" autostart="true" loop="true"></embed>
</div>

There you go :D
 
Here's the site I am testing with.
The Festival people, when I am finished doing this, will be visiting this site to have a look through it etc so will need to impress them.

http://joomla.deisehost.com/index.php

You will see
PHP:
<div style="display:none;"><embed src="galwaygirl.mp3" /></div>
just above </body>

Hope someone can help. :confused4
 
Nope. Still can't hear anything.

Code:
<embed src="yourbgmusic.mp3" autostart="true" loop="true" width="0" height="0"></embed>

That will work, I tested it.

The reason is because not displaying will completely not display the embedded object, rather than invisible..silly me.

Making the height and width 0 essentially makes it invisible.

EDIT: hamster's solution also works, and seems to be more elegant..don't know why I didn't remember that.
 
Last edited:
Well it'll ask whoever runs it to install quicktime since the embedded player is quicktime. Thus the flash player solution, though most people have quicktime as well (not sure about the support on linux for it..but it sounds like for your audience that's not an issue)
 
Last edited:
Ok it's working.
I needed QuickTime so that solved that issue.
I guess when people visit the site they will be prompted to install the plugin if they don't have it.

Thanks big time you two. :)
 
No problem, most people will have quicktime, so it should be that big of a deal. You could always be really obnoxious and run a check (I think?) and then just have the lyrics to the song scroll across the page :p
 
lol

It won't be that song anyways, if they do decided for me to do their site. They have music of their own, basically just about 2 minutes of Drumming.
 
Back
Top