Click to See Complete Forum and Search --> : Background sound


cny1947
12-21-2005, 09:11 AM
bgsound src= - works fine on my web page with no controls showing which is perfect. bgsound is not valid xhtml. I.E. browser runs it, Netscape and Firefox won't. Using the embed src= - works in all three browsers, but with controls showing. They can be hidden, but the sound quality is terrible- broken up. The embed tag I believe is deprecated so it is still not valid. I keep seeing the use of the object tag, but have no idea how to use this. Must it be in an XML document? Or, in CSS?

TheBearMay
12-21-2005, 09:36 AM
An example for Media Player (Note: there is an embed in case object can't be rendered):
<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" width="290" height="45" type="application/x-oleobject" >
<param name="AutoStart" value="1" />
<param name="AutoRewind" value="1" />
<param name="URL" value="sounds/Startup.wav" />
<param name="Mute" value="0" />
<param name="PlayCount" value="1" /> <!-- 0 is continuous when used with AutoStart/AutoRewind -->
<param name="SendOpenStateChangeEvents" value="1" />
<param name="SendWarningEvents" value="1" />
<param name="SendErrorEvents" value="1" />
<param name="SendPlayStateChangeEvents" value="1" />
<param name="ShowCaptioning" value="1" />
<param name="ShowControls" value="1" />
<param name="ShowAudioControls" value="1" />
<param name="ShowStatusBar" value="1" />
<param name="ShowTracker" value="1" />
<embed pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" type="application/x-mplayer2" src="C:\sounds\Startup.wav" autostart="1" loop="true" width="290" height="40" />
</object>
Just place it in the body of your HTML.