Community & Support

Audio playing in the background

I'd like to have an mp3 playing in the background of my site that doesn't stop playing when I switch from node to node unless the user clicks a stop button. How would I do this?

Thanks in advance

Comments

Can this be done?

No one responded to this. I suppose this can't be done?

I need this!

Hello,

If anyone knows how to do it please respond. I tried with frames... but does not really work. I am realoading the fonrt page everytime i click some menu item.

Thank you,
Andrei Ciubotaru
Inocentric Srl
www.inocentric.com

Thank you,
Andrei Ciubotaru
Inocentric Srl
www.inocentric.com

What you could do is to grab

What you could do is to grab a flash mp3 player widget and embed it in a block on your site. I used the one on this site once http://www.ericzhang.com/mp3.php but there are many out there to choose from.

Any solution in Drupal 6??

Someone could resolve this issue?? I'm using Drupal 6 and I'm trying to play music in the background but still couldn't find a solution.

I'm trying to play music in the background too

So, How is it?
Which modules Could you suggest me, us ????

Drupal best CMS

Use the audio module

If you don't want the audio to not stop playing until the user presses stop here are you're options: (the last one is the best one)
1. Audio module http://drupal.org/project/audio
With the audio module you can upload audio files and embed them into specific pages with the mp3 player it comes with. You can also theme the mp3 player.

2. Frames same song for entire site
If you're going to be playing the same song throughout the pages and not have a specific song for a specific page then you have to create a frame and embed the audio file in it. Make the frame with the audio only one pixel high and one ppixel wide with no scrollbars or borders and have the other frame take up the rest of the frameset to display the site.
Setup:
Frame 1 = Small, at the top/buttom, has the music player
Frame 2 = Drupal site page

3. Frames specific song for specific page
If you want a specific song for a specific page make individual frames close when another is opened that way when user goes to another page a specific song for that page is played. In the first page with a music frame in that music frame link to the other music frames like this
Pagename

4. Popup same song for entire site or specific song for specific page
Include the audio file in a popup under the page. Bad option because many block popups so you'd have to add a block that says disable popup blocker to hear site's music.

5. The Best Option
Audio Module, XSPF Web Player, XSPF Playlist
This is the best option (and the one I use for my site it's Drupal 6). For my site anonymous users get a playlist that they control from page to page and my registered users can create their own playlists (I also created a widget that allows users to have multiple playlists and select which playlist they want in the xspf player). The xspf player has an extended player theme that lets you put an image for each song. If you don't want that you can use the button version which is a play/stop button or the slim version which has play/stop with the song title in a single bar.
Setup
* you got the audio module right?
http://drupal.org/project/audio

a. get the xspf flash player (continuous controllable mp3 player)
http://sourceforge.net/projects/musicplayer/

b. get the xspf flash player instructions
http://www.lissaexplains.com/mp3player.shtml
http://musicplayer.sourceforge.net/ (you'll see the theme versions here)

c. get the drupal xspf playlist module
http://drupal.org/project/xspf_playlist

d. install the xspf flash player for the audio module
How to add more players to the audio module
http://drupal.org/node/468866

thanks

for so great answer... will try it..

Drupal best CMS

Does option 5 solve the "same

Does option 5 solve the "same song for the entire site" situation? Or do you still need to embed it in a frame (option 2)? I didn't see anything in the xspf flash player documents to suggest that it does, and a couple of sample sites that I visited don't work that way. (For example, the Danny Spears Band link from the Lissa Explains instructions will stop playing if I click on one of the other links on that site.)

Not that it's a huge issue if I have to do the frame myself. I just don't want to waste a lot of time searching for a feature that may not exist, nor do I want to reinvent the wheel.

Thanks,
Gary

Gary Feldman
MarsDome, Inc.
http://www.marsdome.biz

Option Five Needs Frame

I use option five for my site that's still on localhost on my asus eee pc.
What site did you go to that had the player stopping? They may not be using the current player.

I use boutell's xspf flash player because it has an autoresume feature that saves whether the user wants the music played or not.

question about step 2

2. Frames same song for entire site
If you're going to be playing the same song throughout the pages and not have a specific song for a specific page then you have to create a frame and embed the audio file in it. Make the frame with the audio only one pixel high and one pixel wide with no scrollbars or borders and have the other frame take up the rest of the frameset to display the site.
Setup:
Frame 1 = Small, at the top/bottom, has the music player
Frame 2 = Drupal site page

First of all .. i agree that background music these days has absolutely no point, but in this case i have to make an exception because the client has the final word .. :( ..
I would like to play an audio ( only one audio swf file) in background without interruption while browsing the site .. and without messing with ajax/asynchronus stuff.
I`m having problem understanding the above method.

Where should I define/put those 2 frames loading player and drupal content?

I did something similar to your solution but with a small "bug" .. :(

index.html

<body>
        <div id="sound">
  <object style="visibility: visible;" id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="80" height="20">
  <param name="movie" value="misc/flash/audioplayer.swf">
  <param name="quality" value="high">
  <param name="wmode" value="transparent">
  <param name="swfversion" value="6.0.65.0">
  <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
  <param name="expressinstall" value="misc/flash/expressInstall.swf">
  <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
  <!--[if !IE]>-->
  <object type="application/x-shockwave-flash" data="misc/flash/audioplayer.swf" width="80" height="20">
    <!--<![endif]-->
    <param name="quality" value="high">
    <param name="wmode" value="transparent">
    <param name="swfversion" value="6.0.65.0">
    <param name="expressinstall" value="misc/flash/expressInstall.swf">
    <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
    <div>
      <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
      <p><a href="http://www.adobe.com/go/getflashplayer"><img src="get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33"></a></p>
        </div>
    <!--[if !IE]>-->
  </object>
  <!--<![endif]-->
</object>
       </div>

<iframe name="mainBody" src="index.php" border="0" scrolling="no"
marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0"
style="position: absolute; left: 0px; top: 0px; z-index: -99; width: 1265px; height: 1110px;"></iframe>

</body>

I have found temporary/beta solution with "replacing" index.php with index.html, and loading/including index.php in an iframe inside index.html. I made changes to .htaccess to load index.html and then index.php, where index.html contains index.php in an iframe and swf player. It works like it is supposed to, but i always get url without the path of drupal nodes which is understandable because of loading drupal in an iframe.

Could you explain a little bit of yours second solution or is there any way for me to fix my url "bug" ??

10x in advance
i appreciate any help ..

Cheers ..

Thanks

This may have just solved my problem. I'll try one of the options above. Thank you for this post

try to this

<div>
<embed
src="melodyloops-notes-mp3-player.swf"
width="25"
height="16"
allowscriptaccess="always"
allowfullscreen="false"
flashvars="Love.mp3&volume=30&backcolor=ffffff&maincolor=00648C&timeplay=0"
/>
</div>

you download the music player.swf files from the following website..
http://www.melodyloops.com/stuff/free-website-music-player/

i think its helps for u..

thank u

senthil

Drupal 7 and non flash

Is there a Drupal 7 and a non flash solution to this as iPads and iPhones are not compatible

sorry to be awkward thanks

I used this last method. I

I used this last method. I need one song for all my site, without interruption.
The problem of the stop and go of the music persists.
I think needs a way to make that block not refreshable by drupal.

some tip?

fab
---
The gratest and best man, alone, never will overbear two perfect idiots well organized