The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Background music not playing when in Guest view.

Go down

Solved Background music not playing when in Guest view.

Post by Guest Fri Jan 09 2015, 09:02

Hello again! Smile

I've got some background music installed on my http://www.game-xtreme.com , which is a phpBB3 board. It's playing hidden in guest view only, made in a custom widget for that. Here's the code:


Code:
<div id="ForumIntroMusic_by_Samantha" style="width:1px;height:1px;overflow:hidden;">

    <object style="width: 300px; height: 300px;"><param
id="allowscriptaccess" value="always" /><embed style="width:
300px; height: 300px;"
src="http://www.youtube.com/v/IboXhKsDVik?autoplay=1&loop=0"
type="application/x-shockwave-flash" allowscriptaccess="always"
/></object>
</div>

I'm wondering why this code isn't working on my other phpBB3 board: http://fcnl.actieforum.com . I mean, I'm using the same configuration, right?

By the way, the new code I'm trying to use is slightly different and only refers to another YT song:

Code:
<div id="ForumIntroMusic_by_Samantha" style="width:1px;height:1px;overflow:hidden;">

    <object style="width: 300px; height: 300px;"><param
id="allowscriptaccess" value="always" /><embed style="width:
300px; height: 300px;"
src="http://www.youtube.com/v/oR-29kYl_a0?autoplay=1&loop=0"
type="application/x-shockwave-flash" allowscriptaccess="always"
/></object>
</div>

And I want to keep those widgets out of view, like on http://www.game-xtreme.com .

Could someone please help me with that?


Many thanks in advance.

Samantha.


Last edited by SamanthaS on Sat Jan 10 2015, 01:25; edited 1 time in total
avatar
Guest
Guest


Back to top Go down

Solved Re: Background music not playing when in Guest view.

Post by Ange Tuteur Sat Jan 10 2015, 00:08

Hello @SamanthaS,

Try this :
Code:
<div style="height:0;width:0;overflow:hidden;">
  <embed src="http://www.youtube.com/v/oR-29kYl_a0?autoplay=1&loop=0" type="application/x-shockwave-flash" allowscriptaccess="always"/>
</div>
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Background music not playing when in Guest view.

Post by Guest Sat Jan 10 2015, 00:32

Ange Tuteur wrote:Hello @SamanthaS,

Try this :
Code:
<div style="height:0;width:0;overflow:hidden;">
  <embed src="http://www.youtube.com/v/oR-29kYl_a0?autoplay=1&loop=0" type="application/x-shockwave-flash" allowscriptaccess="always"/>
</div>
It played just a couple of notes and then it stopped Shocked  I don't know if you hear anything when you link up, but just to make sure I'm gonna restart my laptop meanwhile. I'll be back shortly...

EDIT: Nope, still nada....
avatar
Guest
Guest


Back to top Go down

Solved Re: Background music not playing when in Guest view.

Post by Ange Tuteur Sat Jan 10 2015, 00:57

Oh, you have that in the right column correct ? If so, remove the following from your stylesheet.
Code:
#right { display:none }

Since the parent is hidden, the child content, being the embedded element, wont play. It's like when you try to execute the click event on an element that's hidden; it wont work, because you can't click what you can't see.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Background music not playing when in Guest view.

Post by Guest Sat Jan 10 2015, 00:59

Ange Tuteur wrote:Oh, you have that in the right column correct ? If so, remove the following from your stylesheet.
Code:
#right { display:none }

Since the parent is hidden, the child content, being the embedded element, wont play. It's like when you try to execute the click event on an element that's hidden; it wont work, because you can't click what you can't see.
But then the right widget column appears. I don't want that. I've got Dions Recent Topics installed and I don't want to use the 180 px. on the right for non-visible widgets. Do you know a solution? I don't want any widget bars eating away the forum.
avatar
Guest
Guest


Back to top Go down

Solved Re: Background music not playing when in Guest view.

Post by Ange Tuteur Sat Jan 10 2015, 01:07

Set the width to 0 ?
Code:
#right { width:0 }

It looks like you already took care of the margin and floats on the content.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Background music not playing when in Guest view.

Post by Guest Sat Jan 10 2015, 01:11

Ange Tuteur wrote:Set the width to 0 ?
Code:
#right { width:0 }

It looks like you already took care of the margin and floats on the content.
Yep! Perfect this time! Can you hear it too? So I can use my original coding too then?

Thanks!
avatar
Guest
Guest


Back to top Go down

Solved Re: Background music not playing when in Guest view.

Post by Ange Tuteur Sat Jan 10 2015, 01:14

Yeah, I can hear it. Your original should work, I didn't notice you had the right column hidden at first.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Background music not playing when in Guest view.

Post by Guest Sat Jan 10 2015, 01:15

Ange Tuteur wrote:Yeah, I can hear it. Your original should work, I didn't notice you had the right column hidden.
Thanks dude! Hello Another one down the archive drain... Wink
avatar
Guest
Guest


Back to top Go down

Solved Re: Background music not playing when in Guest view.

Post by Ange Tuteur Sat Jan 10 2015, 01:30

You're welcome Smile

Topic archived
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum