Forum Moderators: open
<!-- START HOME MUSIC CODE
if (navigator.appName == "Microsoft Internet Explorer") {
6document.write('<bgsound src="intro.mp3" LOOP="false">');
}
else {
document.write('<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" Name="MediaPlayer" src="intro.mid" AutoStart="true" ShowStatusBar="0" ShowControls="0" ShowDisplay="0" volume="-1" HEIGHT="1" WIDTH="1" loop="false"><br>');
}
// End -->
Thanks!
welcome to WebmasterWorld, dange!
you might try adding some <param> tags and enclosing the param/embed tags in an <object> tag.
most people around here will discourage you from adding background music to your site...
[webmasterworld.com...]
<object id="mediaPlayer" width="1" height1"
classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
<param name="Name" value="MediaPlayer" />
<param name="src" value="intro.mid" />
<param name="AutoStart" value="true" />
<param name="ShowStatusBar" value="0" />
<param name="ShowControls" value="0" />
<param name="ShowDisplay" value="0" />
<param name="volume" value="-1" />
<param name="HEIGHT" value="1" />
<param name="WIDTH" value="1" />
<param name="loop" value="false" />
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" Name="MediaPlayer"
src="intro.mid"
AutoStart="true" ShowStatusBar="0" ShowControls="0" ShowDisplay="0" volume="-1" HEIGHT="1" WIDTH="1" loop="false">
</embed>
</object>
- Surfers often are already listening to their own music.
- Surfers don't inherently have an easy method of pausing their music.
- Surfers don't inherently want to pause their music for a website.
- Surfers prefer making a choice to enable site audio versus having to disable it.
With that in mind you should do at least two things...
1.) Create an option to enable site audio with it disabled by default.
2.) Use Flash...the method you're using might stream and I'm not sure because the method is proprietary anyway. This is a rare example of when I do use Flash.
Some sites are more subjective to users preferring audio. It's always a good choice to ask your site's visitors what they think.
My site still has an audio introduction although you'll at best only hear it on the second visit if you have enabled site audio.
- John