Jump to content


Background sound

  • Please log in to reply
7 replies to this topic

#1 johnnyk

  • Members
  • PipPipPip
  • Advanced Member
  • 126 posts

Posted 15 August 2006 - 05:47 PM

What's the best way to embed a sound into a webpage so that it will work with most browsers? Also has to be something that doesn't give the Firefox plugin error.
Rediscover the Web:
<a href="http://www.spreadfir...;t=219"></a><br />

#2 CoderGenius

  • New Members
  • Pip
  • Newbie
  • 9 posts
  • LocationSomewhere on earth...

Posted 15 September 2006 - 02:08 PM

Well I'm not positive about the firefox plugin error, but this should work in all browsers:
[pre]<embed src="Beethoven's Symphony No. 9 (Scherzo).wma" autostart="true" loop="true" width="500"
<bgsound src="Beethoven's Symphony No. 9 (Scherzo).wma" loop="infinite">
just use your sound file instead of that one.
the noembed tags are so that older versions of IE can use it, and it keeps newer versions of IE from reading it and the embeded one and getting an error.
Hope this helps
Ready to play? Come join the fight in Lost Requiem

#3 CoderGenius

  • New Members
  • Pip
  • Newbie
  • 9 posts
  • LocationSomewhere on earth...

Posted 15 September 2006 - 02:13 PM

oh ya and you can change the height and width to whatever size you need.
(making them both zero makes it Invisible)
Ready to play? Come join the fight in Lost Requiem

#4 Daniel0

  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 16 September 2006 - 06:09 AM

Many people are annoyed by background music. It's one of the most annoying things on the internet.

#5 ToonMariner

  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 17 September 2006 - 09:28 PM

you shoudl never play a sound with out asking the user!!!!!
follow me on twitter @PHPsycho

#6 phprocker

  • Members
  • PipPipPip
  • Advanced Member
  • 91 posts

Posted 19 September 2006 - 04:53 AM

Doesn't <embed> work with all browers these days?  Is <noembed> still needed? 

#7 fenway

  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 20 September 2006 - 12:43 PM

I didn't think that FF would handle windows media files properly by default... but EMBED isn't a W3C tag, nor is BGSOUND -- OBJECT would be the right way to go.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#8 smashingred

  • Members
  • PipPip
  • Member
  • 15 posts

Posted 21 September 2006 - 10:48 PM

<embed> was developed by Netscape in the 90s as part of many proprietary elements during the browser wars between them and MicroSoft. It behaves buggy in Firefox but is supported by Internet Explorer.

That aside if you want to learn about what is called bounce rates put audio on your page and play it without asking the user. It is considered both rude and invasive. For the most part people expect for their browsing experience to be silent unless they are actively using a multimedia file. It was trendy for amateurs to put midi files into their pages and autoplay on load back in the mid 90s. It along with flash sites with obtrusive intros or annoying splash pages are not user oriented and will put off more people that they impress.

If you want people to be interested in the sound you have to offer I would suggest a prominent link in the middle of the page or in an obvious place to say, "Turn On Music" or some such.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users