PDA

View Full Version : sound doesn't play with latest netscape


phmayor
07-16-2005, 08:57 PM
I just downloaded the latest version of Netscape for Mac (7.2) and HTML files with an embedded .aiff sound file which play perfectly well on Explorer, Safari, and previous Netscapes now don't play at all on the latest Netscape or Firefox which I just tried. Anyone have any idea if I'm doing something wrong? It's just a simple javascript which I include below. Any help would be greatly appreciated as this is for an interactive game site where the sound files are very important.

<SCRIPT LANGUAGE=JavaScript><!--

if ( navigator.appName == 'Netscape' ) {
document.write( '<embed src = "soundeffect.aiff" autostart="true" hidden="true" loop="true"></embed>' );
} else if ( navigator.appName == 'Microsoft Internet Explorer' ) {
document.write( '<bgsound src = "soundeffect.aiff" loop="-1">' );
} else document.write( '<bgsound src = "soundeffect.aiff" loop="-1"><embed src = "soundeffect.aiff" autostart="true" hidden="true" loop="true" ></embed>' );

//--></SCRIPT>

_Aerospace_Eng_
07-16-2005, 09:13 PM
The latest versions of the gecko browsers, e.g Netscape, Firefox, etc. don't carry support for the aiff file since its not a sound file that should be used on the web. You will need to convert it to another format.

phmayor
07-16-2005, 09:18 PM
Okay thanks. In a way that's good news because I was afraid I'd have to make a lot more changes. Any advice on what file format I should change to?

Thanks so much for your response by the way.

Philip
Los Angeles

phmayor
07-16-2005, 09:21 PM
What am I saying. I thought that might be the problem so I did a test with a .wav file and it would't play either. I'll double check to make sure I did that right but I did try using another file type.

Philip

phmayor
07-16-2005, 09:24 PM
Did a test using that javascript and a .wav file. Previews fine in Explorer, Safari, and older (previous) Netscape. Not in the latest Netscape.

Philip

_Aerospace_Eng_
07-16-2005, 09:45 PM
You might actually have to specify the mplayer2 plugin. Try this embedded media player generator (http://cit.ucsf.edu/embedmedia/step1.php), use the WMP one. You can set the width and height to like 1, and add this to the object tag so it plays like a background sound
style="position:absolute;top:0;left:0;"
You may want to detect the OS now since mplayer2 type plugin may not work on a mac, so you would want to feed the embed tag to the mac. But still aiff is way too large to be on the web, you should convert it simple as that. I know for sure if I went to a site that had an aiff as a bgsound, I would never go back.

phmayor
07-17-2005, 01:04 AM
Well the aiff file I converted to wav was actually larger as a wav, and whether or not aiff files "should be on the web" is a judgement call. A good browser should still play them. Unless there is something wrong with the javascript I am using (and again, it's played fine on all platforms and other browsers) I'm tempted not to go through the trouble of changing something -- why shouldn't the netscape developers realize there's something wrong with their browser? By the way this is an interactive game site, so it needs sound and no one would not go to it because it has sound. The aiff files I'm using are quite small for little effects like door closings and the like. These are not large background files of music.

phmayor
07-19-2005, 08:47 PM
I want to add one other comment in case anyone reads this -- I like the browsers Opera and Firefox a lot actually, and this makes me very upset that they don't recognize the javascript because I have been developing a web-based game that literally has over a quarter million documents. Many of these use embedded sound that won't play on the latest Netscape, Opera or Firefox. I'm hoping there is a solution to this that is not only easy but can somehow be done globally, through a search and replace procedure, otherwise there seems no way to make this work for those browsers, and that would be a shame because they play the graphics and animations actually a lot smoother than Safari or Explorer.

Any help or comments would be appreciated.

Philip