Question

I want to add music which runs in the background of a website being developed for a client. The site is generated in Joomla. Does anyone knows about any component (or any way) through which I can add music which runs in the background of the website.

I know it can be achieved via embed tag in the index page of the selected template, but one additional requirement (from the client) is whenever any visitor clicks on any other link, the music should continue but not start from the beginning. Is it feasible? Can anyone help me regarding this?

Was it helpful?

Solution

I haven't tried it but i'm thinking you can add a custom html module. Read the W3C documentation below. HTML5 Audio

Ok, i just tried it.

Update

I added a new module to Joomla. Choose "Custom HTML". In the content put something similar to this

<p>&nbsp;<audio autoplay="autoplay" loop="loop" controls="controls">
    <source src="images\Audio\rock-guitar_fJqv24ru.mp3" type="audio/mpeg" />Your browser does not support the audio tag.</audio>

OTHER TIPS

The only way you are going to be able to play the music without restarting the song every time a link is clicked is to load the Joomla site in a frame and the audio player in another frame.

I would seriously recommend talking to the client though. Audio is a common cause of high bounce rates and loading the site in a frame is going to screw up your SEO.

I say DON'T DO IT...

However if you still want to carry on with background music idea... Here 2 good plug-in/module to accomplish this intrusive feature.

  1. Music Player - Player like option with auto-play. The visitor will be able to STOP background music and adjust volume control.
  2. JBGMusic - demo link is broken in JED, here is working one. Unfortunate user will have absolutely no control over background music.

Have you looked at the Joomla extensions, there are a few media players there. If you're after after an auto playing music in the background with no controls, you won't find it there though. If that is what you're planning please don't!

Best would be go to into the themes/template header code, add it to the body.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top