• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

No Sound

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To Expert:
I have built a web page that looks pretty good when I use Internet Explorer 5, but when I use Netscape there are problems galore. I won't list all my problems here, but one of them is the sound doesn't work. I am using this code:
<embed src="Music.MID" width=1 height=1
autostart="true" loop="false" hidden="true" />
For some reason I don't hear anything with Netscape. It might help to know I am using Netscape 6, which is the lastest one. Any help would be appreciated.
Thanks,
Tim
 
Ken Bates
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What I heard from another board is that I need to use the hidden media player tag. Does anyone know what this looks like?
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Netscape uses the OBJECT tag, where IE uses the EMBED tag. Here's the code we use:
<Script language="JavaScript">
playerName = "audio";
fileName = 'audiofile.wav'; autoStart = 1;
width = 5; height = 5; showControls = 1;
if (!netscape) {
document.write('<object classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" name="' + playerName + '"\
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"\
width="' + width + '" height="' + height + '" id="vPlayer" type="application/x-oleobject" standby="Loading Media File..." VIEWASTEXT>')
document.write('<param NAME="AutoStart" VALUE="' + autoStart + '">')
document.write('<param NAME="AutoRewind" VALUE="0">')
document.write('<param NAME="DisplayMode" VALUE="false">')
document.write('<param NAME="DisplaySize" VALUE="0">')
document.write('<param NAME="ShowControls" VALUE="' + showControls + '">')
document.write('<param NAME="ShowDisplay" VALUE="0">')
document.write('<param NAME="FileName" VALUE="' + fileName + '">')
}
if (netscape)
document.write('<EMBED TYPE="application/x-mplayer2" PLUGINSPAGE="http://www.microsoft.com/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=Media&sba=Plugin&" SRC="' + fileName + '" AutoStart=' + autoStart + ' ShowDisplay=0 ShowControls=' + showControls + ' NAME="' + playerName + '" width="' + width + '" height="' + height + '"></EMBED>')
if (!netscape)
document.write('</object>');
</Script>
 
Ken Bates
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've had trouble with this one. Thanks!
reply
    Bookmark Topic Watch Topic
  • New Topic