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 January 9th 2015, 8:02 am

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 January 10th 2015, 12:25 am; 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 January 9th 2015, 11:08 pm

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 : 13207
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 January 9th 2015, 11:32 pm

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 January 9th 2015, 11:57 pm

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 : 13207
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 January 9th 2015, 11:59 pm

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 January 10th 2015, 12:07 am

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 : 13207
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 January 10th 2015, 12:11 am

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 January 10th 2015, 12:14 am

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 : 13207
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 January 10th 2015, 12:15 am

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 January 10th 2015, 12:30 am

You're welcome Smile

Topic archived
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
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