PDA

View Full Version : SOUND for Firefox?



Wedgy
11-13-2005, 02:19 AM
Okay this is bugging me:
I finally got background sound to work well in I.E. with the following:



//--- sound.js ---
var MSIE=navigator.userAgent.indexOf("MSIE");
var NETS=navigator.userAgent.indexOf("Netscape");
var OPER=navigator.userAgent.indexOf("Opera");
if((MSIE>-1) || (OPER>-1)) {
document.write("<BGSOUND SRC=sound.mid LOOP=INFINITE>");
} else {
document.write("<EMBED SRC=sound.mid AUTOSTART=TRUE ");
document.write("HIDDEN=true VOLUME=100 LOOP=TRUE>");
}
//----- END sound.js -----

...and in my webpage I put:


<!-------------------------- BACKGND MUSIC --->
<SCRIPT LANGUAGE="JavaScript" src="../scripts/sound.js"></SCRIPT>

(in the same folder I have a music file, "sound.mid" .
This works fine with I.E.
But Firefox pretends it doesn't have the right plug-in,
and no matter how I 'update' Firefox, I don't get sound, just a yellow bar.
Finally, I know Firefox can play sound, because *other websites* can play sound in my browser.

cripes.

jscheuer1
11-13-2005, 03:05 AM
See if this is any help, works here in both browsers (not Opera though):


<html>
<head>
<title>Cross Browser Sound - Demo</title>
<style type="text/css">
.snd {
height:0;
width:0;
position:absolute;
top:0;
left:0
}
</style>
<script type="text/javascript">
/*Cross Browser Sound Script
Copyright John Davenport Scheuer
Permission granted for use
This credit must stay intact*/
//////////No need to Edit Script/////////
function e_sound(soundobj) {
if((!document.all)&&(document.getElementById)){
var thissound= eval("document."+soundobj);
thissound.Play();
}
else if(document.all){
var a=eval("document.all."+soundobj+".src");
document.all.sound.src=a;
}
else
return;
}
</script>
</head>
<body onfocus="if(document.all)document.all.sound.src=''">
<bgsound id="sound">
<!--edit below embeds to add different SRC sounds or add more,
use a unique name for each embed-->
<embed class="snd" NAME="chm" SRC="chimes.wav" AUTOSTART="false" loop="false" HIDDEN="true">
<embed class="snd" NAME="dng" SRC="ding.mp3" AUTOSTART="false" loop="false" HIDDEN="true">
<embed class="snd" NAME="thp" SRC="thup.wav" AUTOSTART="false" loop="false" HIDDEN="true">
<!--use with any element that supports onMouseOver, onMouseOut or onClick events-->
<span onmouseOver="e_sound('chm')" onmouseOut="e_sound('dng')">Mouse Over This for Chime, Mouse Out for Ding</span>
<br><a href=// onmouseOver=e_sound('thp')>Thup!</a>
</body>
</html>

jscheuer1
11-13-2005, 03:22 AM
On the other hand, this works in IE FF and Opera:


<html>
<head>
<title></title>
</head>
<body>

<embed src="chimes.wav" autostart="true" hidden="true">

</body>
</html>

If something like that won't do the trick for you, FF either isn't set up to handle .mid or sound support is turned off somewhere.

Wedgy
11-13-2005, 08:51 AM
Okay, I tried your code above, with a few small changes:


<embed class="snd" NAME="chm" SRC="sound.wav" AUTOSTART="false" loop="false"

HIDDEN="true">

<embed class="snd" NAME="dng" SRC="sound.mp3" AUTOSTART="false" loop="false"

HIDDEN="true">

<embed class="snd" NAME="thp" SRC="sound.mid" AUTOSTART="false" loop="false"

HIDDEN="true">


Allowing me to test three file formats.

In I.E. there is no problem. All three sounds play, and cut each other off.

In Firefox, I get this:
http://lentils.imagineis.com/p/firefox1.jpg

Naturally, I click on Install Missing Plugins:
http://lentils.imagineis.com/p/EQ_06.jpg
And following through:
http://lentils.imagineis.com/p/EQ_07.jpg

Wedgy
11-13-2005, 09:04 AM
and continuing...
http://lentils.imagineis.com/p/EQ_08.jpg
http://lentils.imagineis.com/p/EQ_09.jpg

Wedgy
11-13-2005, 09:06 AM
So we proceed:
http://lentils.imagineis.com/p/EQ_11.jpg
http://lentils.imagineis.com/p/EQ_12.jpg

...as we have done before.
I hate Quicktime, and I don't want it on my Windows OS at all,
but if this is what it takes to get Firefox working with sound, okay:
except the sound still doesn't work.
I thought perhaps it was because Firefox is not my Default Browser.
So I made Firefox my Default Browser, and reinstalled Quicktime (7.x).

Only there is still no sound, and I get the same yellow bar across the browser.
So while I am at AppleCrap website, I search their forum for clues:
The only threads I find are:
http://lentils.imagineis.com/p/EQ_13.jpg

Also, some comments which may be related in another thread:


I am having some problems with my .avi files. when i open one, it says that i need to install some components. i installed a couple and nothing happened. i just get a white screen with audio but no video. i was wondering what i should do or if there is a certain one of those components i should install. i am using a windows computer

Depends on what version of Quicktime you are using. If it is QT 6 you can obtain QT decompressors for QT for many avi files from these two sites. Note that these decompressors don't work well or even at all with QT 7. Hopefully the developers will soon release decompressors that work with QT 7.
http://www.divx.com
http://www.3ivx.com

QT made changes that did not suite the purpose of the majority of users. Right now, I am looking to find another viewer as my default. I agree QT has been nothing but problems

open the file in Quicktime, goto the window menu, select "show movie info", at which point check the format, do a google search for that format, try to find the codec to install, and it'll work at that point, hard part will be finding the crazy codec it was created with...

Until the 3ivx and divx people get their codecs working with QT 7 you may as well just view those files using codecs that are available for Video for Windows and Windows Media Player. Or you can probably play most avi files using this freeware viewer: VLC


It seems there might be hope if I could just install the previous version 6
of Quicktime, only they don't provide it anymore. What A**holes Apple have become.

I really hate the itunes integrated songplayer which takes over your machine and automatically connects you to the internet behind your back, and tells God knows who just what mp3 files you have on your hard drive. But that is another beef entirely, called Spyware Invasion of Privacy.

If this is what it takes to get Firefox to (not) work properly on Windows,
I have to hate Firefox too.
What incompetant clods they all are.

jscheuer1
11-13-2005, 09:07 AM
Well, I've had that happen with other content. I had to set my firewall to allow FF and whatever site it was that wanted to install the new stuff to 'install software'. This isn't happening with .wav or .mpg files, is it? I'd think that .mid might be a little offbeat though, or outdated. Not that I don't think .mid isn't neat, just that all the .mid I remember as sort of limited in depth.

Wedgy
11-13-2005, 09:16 AM
All three file formats DONT play in Firefox. (worded better: None of the formats play.)

There is no sound.

2) I don't think MIDI files are obseletized, since they are about 1/10 the size of an MP3 or wave file for the same (although muzak versions) amount of musical content. The two formats can be compared to .BMP (mp3) versus .jpg(MIDI).

To have long songs and keep fast download times, i.e., musically interesting pieces like orchestrated symphonies etc., MIDI is the only viable option.

It is only if you are looping 10 second music bytes or sound effects that larger mp3 or even wav files make sense. (granted there are many such cases).


3) Keep in mind that there is no problem downloading the Apple install file.
It is run locally once downloaded, and your browser settings should not in any way affect its installation. The only instruction given is to run the EXE file.

Twey
11-13-2005, 10:26 AM
I'd think that .mid might be a little offbeat though, or outdated.No, the size is one bonus, as well as the easy editing and external MIDI input (e.g. from a musical keyboard or electric piano). MIDI is excellent for certain uses, although it can't handle things like vocals. On my end, audio (in all three formats) is handled perfectly by mplayerplug-in, so this is a Quicktime problem, not a Firefox one.

/EDIT: Try this: after installing the Quicktime player, go to about:plugins in Firefox. Is it listed?

jscheuer1
11-13-2005, 04:45 PM
I don't think MIDI files are obseletized, since they are about 1/10 the size of an MP3 or wave file for the same (although muzak versions) amount of musical content. The two formats can be compared to .BMP (mp3) versus .jpg(MIDI).

I may get back to the larger issue of your problems with FF later but just wanted to comment on the above (emphasis mine in your quote) and to say that In my mind, .wav is to .mp3 as .bmp is to .jpg. It is that Muzak quality I was trying to describe before as lacking depth.

Can't argue about a .mid taking less bandwidth. A 4, 8 or 16 color .gif takes much less bandwidth than a .jpg and fits into the file format analogy better as representing .mid, for me.

Wedgy
11-14-2005, 01:29 PM
Try this: after installing the Quicktime player, go to about:plugins in Firefox. Is it listed?Its worse than that:
In my version of Firefox, I can't even find an 'ABOUT' option on any pulldown menu.
Maybe I have been using the fake version of Firefox all along, and its busy right now copying **** onto my drive and erasing my OS.

Under Tools, I found 'Extensions' but that is the closest thing I can find to your description. Of course I am not a Firefox man.
As Ace Ventura said in "When Nature Calls",
I'm a "single shake man, far too busy for the follow-up jiggle."

Twey
11-14-2005, 04:14 PM
No, I was referring to the action of actually typing "about:plugins" in the address bar and pressing enter. http://www.dynamicdrive.com/forums/images/smilies/smile.gif

Of course I am not a Firefox man.Heh, that's OK. Just so long as you're not one of those damned IE fans. http://www.dynamicdrive.com/forums/images/smilies/tongue.gif

Wedgy
11-15-2005, 04:18 AM
Just so long as you're not one of those damned IE fans.
Of course there is no such thing as an I.E. fan (who isn't paid by Microsoft),
anymore than there's a snowball's chance in hell that 9/11 wasn't a CIA op.

http://lentils.imagineis.com/p/testbush2.gif
Didn't you already suspect this?

--------------------
Okay I tried typing your suggestion into the browser:

about: plugins (http://lentils.imagineis.com/p/plugins.html)

Holy crap: What a nice long detailed list of what I have installed.
Of course I have no idea how to read this information or what to do now.
I still have no sound.

And this is another thing about Firefox I hate: When you save a file, it doesn't create a subfolder with the graphics in it, so I have to reload the same page in I.E. just to save a copy!

Finally, they must think they are clever here with the "ABOUT: PLUGINS" thing,
except of course when you save this file it is useless, since it is just a bunch of Javascript code, and all your information is not saved at all.
Can a Web browser be any more useless by design?

I had to screen capture the entire webpage chunk by chunk, then re-size it
in PHOTOSHOP just to create my own webpage so that you would be able
to see the damn listing. Thanks for wasting my time, Firefox.

According to the listing, It seems I should have sounds coming out my arse.

Twey
11-15-2005, 09:40 AM
Of course I have no idea how to read this information or what to do now.Does it include the word "QuickTime" anywhere on the page? Yes it does. Well, that means we can be sure that QuickTime is being installed properly and recognized by Firefox. Now we just have to work out what the problem is with QuickTime. The next test: download your sound file and play it with QuickTime without Firefox getting involved.
And this is another thing about Firefox I hate: When you save a file, it doesn't create a subfolder with the graphics in it... yes it does? I just tried saving this page as "page.htm," and here you can see:
[twey@delaral ~]$ ls -R page*
page.htm

page_files:
bold forumlogo italic quickreply sendtofriend tongue vbulletin_editor_002
collapse_tcat icon1 navbits_finallink quote separator underline vbulletin_global
collapse_thead icon3 navbits_start quote_002 smile user_offline vbulletin_quickreply
edit icon4 post_old reply subscribe user_online vbulletin_stdedit
externalstyle image printer report testbush2 vbulletin_editor
Finally, they must think they are clever here with the "about: PLUGINS" thing,Why?
except of course when you save this file it is useless, since it is just a bunch of Javascript code, and all your information is not saved at all.You have a problem with copy/paste? Besides, when I save that page, the Javascript is parsed and the output saved.
Can a Web browser be any more useless by design? Definitely. Take a look at IE. :)

jscheuer1
11-15-2005, 10:14 AM
Just a 'quick' thought, .mid doesn't seem to be configured in the quicktime plugin for FF.

Wedgy
11-15-2005, 10:49 AM
well the problems I am having with the latest Firefox are real.

Perhaps they are related.

(1) Firefox isn't saving webpages properly.

(2) There is no sound from any file type: (.mid, .wav, .mp3)

There have been problems reported with both Firefox and Quicktime,
so I don't think I am imagining this.

(3) I can't get older versions to revert to a working setup.

The .mid thing being missing is interesting, and may imply
either improper installation, or missing drivers for version 7 of QT.

(4) Whether we like it or not, IE is supplying me with two essential features:

a) it saves webpages.

b) it has sound.

If Firefox would just offer a minimal set of working features,
I'd be happy to dump IE.

The fact that *your* copy of Firefox is working isn't helping me much at the moment. But it is an interesting puzzle.
By the way, another user has reported the same problem at my site:
His version of Firefox also shows a yellow line at the top and won't play sound.

You have a problem with copy/paste? Well, I didn't try that, but hey, just "SAVE" page would be simpler.

Twey
11-15-2005, 11:20 AM
well the problems I am having with the latest Firefox are real.I'm not saying they're not. However, it seems to be a problem with your setup, rather than being purely FX' fault. Now, please run the test I detailed above.

Wedgy
11-15-2005, 02:41 PM
The next test: download your sound file and play it with QuickTime without Firefox getting involved.
Okay, I don't need to download anything, since I have all the .mid files on my hard drive here. Normally when I click on a midi file or any other music file, it gets played by Mplayer or Realplayer if its a .ram file. Mplayer doesn't seem to recognize those.

So I clicked on the Quicktime icon (new for me):
http://lentils.imagineis.com/p/ff/09.jpg

I opted to 'reset' files so that Quicktime is the default by pressing ok:
http://lentils.imagineis.com/p/ff/10.jpg

Behold Cindy Lauper in all her (20 years ago and airbrushed) glory.
I loaded a .mid file from the file menu, and Quicktime played it with no apparent problems:
http://lentils.imagineis.com/p/ff/11.jpg
Although it had to open two windows to do it.
Now I imagine my default player options are all screwed up,
being commandeered by Quicktime.
What's the next test?

Twey
11-15-2005, 02:53 PM
Try removing QuickTime, installing the Windows Media Player plugin (for WinXP) (http://www.microsoft.com/windows/windowsmedia/mp10/default.aspx) (or for other Windows versions (http://www.microsoft.com/windows/windowsmedia/9series/player.aspx)), and playing it with that.

Wedgy
11-15-2005, 02:59 PM
(1) Do you mean uninstalling Quicktime from Firefox, or from Windows (2000),
or from both? e.g., from the remove/install software program under settings?

(2) "Playing it with that". Do you mean going to my website and trying to play the music using Firefox, or do you mean just playing the file with mplayer here without firefox?

P.S. I just tried going to my webpage in both IE and Firefox:
Updating the Quicktime defaults may have changed one small thing:
The yellow bar across the top doesn't seem to be showing anymore,
but there is still no MIDI sound (or any other at the moment) from Firefox.
On the other hand, IE plays the music fine still. So it wasn't affected.
Its not a volume problem, because I went to the mixer and turned everything up.
And it doesn't seem to be that I have a copy of Firefox running, because
I tried opening a tab and also running another copy of Firefox.

Twey
11-15-2005, 03:38 PM
(1) Do you mean uninstalling Quicktime from Firefox, or from Windows (2000),
or from both? e.g., from the remove/install software program under settings? Preferably from Firefox, but basically anything that'll stop it interfering with WMP.
(2) "Playing it with that". Do you mean going to my website and trying to play the music using Firefox, or do you mean just playing the file with mplayer here without firefox?Playing the music from the site, using the provided plugin.

Wedgy
11-16-2005, 12:13 AM
Okay, I just checked and I have Windows Media Player version 9 series installed.
According to this page:

Windows versions (http://www.microsoft.com/windows/windowsmedia/player/versions.aspx)

That's the most recent version I can install on my Windows 2000 OS.

There don't seem to be any special 'plug-ins' for Firefox, unless I am failing to
find the right page or something. Is it really required that I uninstall
Windows Media Player and re-install it after installing Firefox? (OMG).

Is there some special feature on the pull-down menus in Firefox, or
yet another secret code to type into the browser, in order to install
a special Windows Media Player Plug-in for Firefox?

This is continuing to hurt...
I went to my website, and the yellow bar is still missing, but there is no sound from Firefox.

Wedgy
11-18-2005, 01:28 PM
I guess I don't deserve to have sound with Firefox...(sniff*)

Twey
11-18-2005, 04:11 PM
I must say, I'm fairly stumped. We've proven that the browser itself is the problem. One last test I can offer you: try it with another browser (not IE) and see if that works.

Wedgy
11-18-2005, 08:30 PM
...it just occurs to me:
COuld Microsoft have sabotaged Firefox with one of its 'security' updates?

I regularly get updates for the Win 2000 OS from the Microsoft Update page.

Twey
11-18-2005, 08:32 PM
Possible, but doubtful. There would have been an uproar, for a start - remember when Microsoft broke msn.com for Mozilla and family? As I suggested, try another browser. That way we can find out if it's just Firefox or not.

Thunderbunny
11-24-2005, 10:22 PM
The trouble with Quicktime as a plug-in is quickly identified if, as has been suggested, you read the 'about:plugins' page. If you you actually read the mimi-types registered for the plugins you will NOT find

audio/mp3
audio/wav
audio/mid

you will find aif, etc. I do not know how to manually edit the mime-types in Firefox (I know you can set the "helper applications" in IE [who care!]). When I searched the MIME type list (http://plugindoc.mozdev.org/winmime.html) I found that there are TWO listed plugins for what I needed. Quicktime and Crescent. I installed (the no longer supported) plugin and fired up the test page I got both the dreaded yellow bar AND music! You can get the working plugin here:

http://www.armadilloweb.com/Crescendo/crescendo_download.shtml

There is also a Yamaha plugin, while not specifically listed for the mp3, etc, it might yet work.

jscheuer1
11-24-2005, 11:19 PM
Just a 'quick' thought, .mid doesn't seem to be configured in the quicktime plugin for FF.


Ahem . . .

Wedgy
11-25-2005, 06:27 AM
I do not know how to manually edit the mime-types in Firefox Me either!

Ahem...Sorry John: I noted this earlier, but again, I have no idea what to do after receiving the obvious info that .MID isn't installed. Is there some button or code in Firefox, or should I just spin the cylinder on the .38 special now?

Dejavu
11-25-2005, 09:51 AM
if you go to www.dejserve.com/atlan with firefox u will see that


<embed src="my.mp3" autostart="true" hidden="true">

does play the background sound. so far that has worked in every browser and format. Simple.

jscheuer1
11-25-2005, 12:27 PM
Me either!
Sorry John: I noted this earlier, but again, I have no idea what to do after receiving the obvious info that .MID isn't installed. Is there some button or code in Firefox, or should I just spin the cylinder on the .38 special now?

I just did an experiment. I opened up Quick Time and hit:

Edit

Preferences

Quick Time Preferences

Then in the drop down box on that screen chose:

Browser Plug-in

Then at the bottom of that screen hit the button:

MIME Settings

Then expanded:

+Audio - Audio only file formats

Now, MIDI file was checked, so I looked in FF and under 'about:plugins' .mid was configured for Quick Time.

So I unchecked it in QT and hit apply, refreshed the screen in FF, now .mid was gone. I checked it in QT and hit apply, again refreshed FF's about:plugins screen and .mid was back.

Worth a shot.