Sign Up! Login: Password: New User? Forgot? Support
Code 
 
 
Forums 
Forums : Multimedia > Add YouTube video as Background Music
Mottie (SuperAdmin) 11/23/2010 9:35 AM EST : Add YouTube video as Background Music
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Add YouTube video as Background Music

GuildPortal admin site link to original post

The following method will add a YouTube video to your page and have it act like background music (no video is seen!). The normal method of adding background music is to go to your page properties (Control Panel > Pages & Content (Widgets) > {pick a page} > Page Properties tab > Sound File Url) and add a URL to your sound file, something like this: http://www.axiomfiles.com/Files/258012/The%20Gates.mp3 - this method does essentially the same thing and has the same disadvantages; for example the music restarts with every page reload. For music that won't restart on reload and across multiple pages of your site, check out the post on adding a pop-out music player.
  1. Grab the embed code.
  2. Zero out the height and width (in red below).
  3. Add "&autoplay=1" to the URL to make the music autoplay (in green)
  4. Add "&loop=1" to the URL to make the music loop forever (in blue)... or use "&loop=3" to make it loop 3x.
    <object width="0" height="0"><param name="movie" value="http://www.youtube.com/v/vRY9Ybi5zqI?version=3&amp;hl=en_US&autoplay=1&loop=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/vRY9Ybi5zqI?version=3&amp;hl=en_US&autoplay=1&loop=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="1" height="0"></embed></object>
  5. Once you have the code ready, paste it into a Free Form Text/HTML widget on the page you want the music.... the only condition is the widget cannot be hidden or the music won't play.
Update 5/7/2012: Apparently, setting the embed width to zero (0) will prevent the player from working, so now you have to set it to one (1) to get it to work. Note the values in red above.
Update 8/13/2012: Added "version=3" to the URL, it should be included with the embed code, but it was missing above.
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Nykeawyn (Applicant) 5/6/2012 2:08 PM EST : RE: Add YouTube video as Background Music
Nykeawyn
Posts: 246

0
Like

0
Dislike

Hi Mottie,

I have been trying to get this one to work on our website, but I just can't get it to go.  I have pasted the URL in the properties but when I try to manipulate the embedded code:

<object style="height: 390px; width: 640px"><param name="movie" value="http://www.youtube.com/v/urNyg1ftMIU?version=3&feature=player_detailpage"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/urNyg1ftMIU?version=3&feature=player_detailpage" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="360"></object>

It just doesn't seem to play.  Any thoughts?

Thanks,
Nyk
TopBottom

Mottie (SuperAdmin) 5/7/2012 9:41 AM EST : RE: Add YouTube video as Background Music
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Hi Nykeawyn!

Apparently the video player no longer plays when the width is set to zero. So I just changed the width to one, but left the height as zero and it started working:
<object height="0" width="0"><param name="movie" value="http://www.youtube.com/v/urNyg1ftMIU?version=3&feature=player_detailpage&autoplay=1"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/urNyg1ftMIU?version=3&feature=player_detailpage&autoplay=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="1" height="0"></object>
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Nykeawyn (Applicant) 5/7/2012 8:22 PM EST : RE: Add YouTube video as Background Music
Nykeawyn
Posts: 246

0
Like

0
Dislike

You are so completely awesome!!!

My kin thanks you

Nyk
TopBottom

whobet (Member) 6/27/2012 10:18 PM EST : RE: Add YouTube video as Background Music

whobet
Posts: 1

0
Like

0
Dislike

Checkout Whobet's New Jukebox(Youtube)

http://www.trks2day.com/jukebox.html

TopBottom

bacillen (Member) 8/13/2012 7:40 AM EST : RE: Add YouTube video as Background Music

bacillen
Posts: 2

0
Like

0
Dislike

Hola!

<object width="1" height="1"><param name="movie" value="https://www.youtube.com/watch?v=wOLiEu7275E=1&amp;hl=en_US&autoplay=1&loop=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="https://www.youtube.com/watch?v=wOLiEu7275E=1&amp;hl=en_US&autoplay=1&loop=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="1" height="0"></embed></object>

This is my code. I failed pretty hard lol, prob because i dont know anything about codes and all. BUT I REALLY WANT THIS TO WORK
I just inserted my video name instead of yours but that was apparantly a very bad idea. CAN YOU PLEASE HELP ME?

/Bacillen

UPDATE:
<object width="0" height="0"><param name="movie" value="http://www.youtube.com/embed/wOLiEu7275Efs=1&amp;hl=en_US&autoplay=1&loop=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/embed/wOLiEu7275Efs=1&amp;hl=en_US&autoplay=1&loop=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="1" height="0"></embed></object>

Still doesnt work... What is the problem?

Characters: Igulia Auduna Fokisua Aoias
TopBottom

Mottie (SuperAdmin) 8/13/2012 9:52 AM EST : RE: Add YouTube video as Background Music
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Hmm, I grabbed a new embed code and it worked for me... I think what is missing is the "version=3" inside the URL:
<object width="0" height="0"><param name="movie" value="http://www.youtube.com/v/wOLiEu7275E?version=3&amp;hl=en_US&autoplay=1&loop=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/wOLiEu7275E?version=3&amp;hl=en_US&autoplay=1&loop=1" type="application/x-shockwave-flash" width="1" height="0" allowscriptaccess="always" allowfullscreen="true"></embed></object> 
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

bacillen (Member) 8/14/2012 6:30 AM EST : RE: Add YouTube video as Background Music

bacillen
Posts: 2

0
Like

0
Dislike

ahaaaa... lol. so easy. and if i want another song i just replace the video with another. but that didnt work D: ohgod. i hate codes. thanks for the help! im very grateful! i feel like a complete retard.


<object width="0" height="0"><param name="movie" value="http://www.youtube.com/embed/L1ltZZJiIv8?version=3&amp;hl=en_US&autoplay=1&loop=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/embed/L1ltZZJiIv8?version=3&amp;hl=en_US&autoplay=1&loop=1" type="application/x-shockwave-flash" width="1" height="0" allowscriptaccess="always" allowfullscreen="true"></embed></object>


Characters: Igulia Auduna Fokisua Aoias
TopBottom

amith003 (Member) 6/21/2013 2:34 AM EST : RE: Add YouTube video as Background Music

amith003
Posts: 1

0
Like

0
Dislike

Hi,
    I am using this player for my site. I Had a problem as my you tube music plays only once. I need it to play infinitely . Please help me in doing this . I had added loop=1 but still playa only once. My code is

<object width="0" height="0"><param name="movie" value="http://www.youtube.com/v/7E1JfaUv4Mk?version=3&amp;hl=en_US&autoplay=1&loop=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/7E1JfaUv4Mk?version=1&amp;hl=en_US&autoplay=1&loop=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="1" height="0"></embed></object>


Thanks in advance

TopBottom

Mottie (SuperAdmin) 9/14/2013 12:09 AM EST : RE: Add YouTube video as Background Music
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Hi amith003!

Are you still having this issue?
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

 
 
Key 
New posts No new posts
New posts ( popular ) No new posts ( popular )
New posts ( sticky ) No new posts ( sticky )
New posts ( locked ) No new posts ( locked )
 
 
Who's Online 
There are   members online.
 
 
So-and-so has logged on!
%title%
%message%