play .wav

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Todd Anderson

    play .wav

    Any body know of a javscript that will play a sound.wav file repeatedly onLoad?
    Thanks in advance for your help.
  • Josh Surber

    #2
    Re: play .wav

    Nope, but then again .wav files are pretty much useless to people who
    would rather use an efficiant OS rather than Windows. If you don't care
    about compatability though (using wav files would seem to say that you
    don't) IE added a bgsound attribute to the <body> tag. Just don't try
    to validate your pages after using it.

    Comment

    • Markus Ernst

      #3
      Re: play .wav

      "Josh Surber" <josh@DELETE.TH IS.TEXT.surber. us> schrieb im Newsbeitrag
      news:1707200300 22046963%josh@D ELETE.THIS.TEXT .surber.us...[color=blue]
      > Nope, but then again .wav files are pretty much useless to people who
      > would rather use an efficiant OS rather than Windows. If you don't care
      > about compatability though (using wav files would seem to say that you
      > don't) IE added a bgsound attribute to the <body> tag. Just don't try
      > to validate your pages after using it.[/color]

      So what file format and embedding syntax do you suggest for playing sound in
      a compatible and standards compliant way?

      --
      Markus


      Comment

      • Prodoc

        #4
        Re: play .wav

        Markus Ernst wrote:[color=blue]
        >
        > So what file format and embedding syntax do you suggest for playing sound in
        > a compatible and standards compliant way?
        >[/color]

        The following does the trick for playing mp3 files, I used it a lot but
        in this case it has got nothing to do with JavaScript. This will work in
        multiple browsers though I haven't tested it thoroughly, IE 5.5, IE 6.x,
        Moz 1.x, Opera 6.x and Opera 7.x should work though.
        Also this doesn't solve the problem in the first place, this won't cause
        the file being played repeatedly.

        <object id="music" data="music.mp3 " type="audio/mpeg" style="heigth:0 px;
        width:0px"></object>

        Comment

        • J K

          #5
          Re: play .wav

          Here's a non-standard html that I found several years ago. I believe it
          works on either IE or Netscape. It has been sooo long ago that I do not
          remember what it all means, but it does work. There is a loop parameter -
          you'll have to look up the "bgsound" on one of the HTML sites for
          discussion.

          ------html example 1----------

          <embed src="closer1.mi d" autostart=true hidden=false>
          <noembed>
          <bgsound src="closer1.mi d" loop="1">
          </noembed>

          -----------end of example 1----------------

          [color=blue]
          > Any body know of a javscript that will play a sound.wav file
          > repeatedly onLoad? Thanks in advance for your help.[/color]

          Comment

          Working...