Page 1 of 4 123 ... LastLast
Results 1 to 10 of 31

Thread: SOUND for Firefox?

  1. #1
    Join Date
    Nov 2005
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default SOUND for Firefox?

    Okay this is bugging me:
    I finally got background sound to work well in I.E. with the following:

    Code:
    //--- 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:
    Code:
    <!-------------------------- 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.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    See if this is any help, works here in both browsers (not Opera though):

    Code:
    <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>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    On the other hand, this works in IE FF and Opera:

    Code:
    <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.
    Last edited by jscheuer1; 11-13-2005 at 03:32 AM.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Nov 2005
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Okay, I tried your code above, with a few small changes:
    Code:
    <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:


    Naturally, I click on Install Missing Plugins:

    And following through:
    Last edited by Wedgy; 11-13-2005 at 09:03 AM.

  5. #5
    Join Date
    Nov 2005
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    and continuing...


  6. #6
    Join Date
    Nov 2005
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    So we proceed:



    ...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:


    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.

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Nov 2005
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.
    Last edited by Wedgy; 11-13-2005 at 10:01 AM.

  9. #9
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Quote Originally Posted by John
    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?
    Last edited by Twey; 11-13-2005 at 10:30 AM.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Wedgy
    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •