Results 1 to 3 of 3

Thread: embed Sound

  1. #1
    Join Date
    Jan 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default embed Sound

    I'm having a heck of a time.

    I want to embed a sound (either a mid or wav file).

    Here's the code I'm trying to use-

    <EMBED SRC="peanuts.mid" AUTOSTART=FALSE LOOP=FALSE WIDTH=145 HEIGHT=55 ALIGN="CENTER">
    </EMBED>


    I put this in the body of my page.

    Will it play? Of course not!


    Geez, I'm giving up in frustration!

    I'm using Kompozer and FireFox 3.5.8 and Ubuntu 9.10 (Linux)


    Any idea how to fix this problem?

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Encode the file with flash and export it, try and make a javascript player, or try one of these other 2 ways http://www.tips-tricks.com/sound.asp
    Corrections to my coding/thoughts welcome.

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    There are a number of ways to put sounds in a page, but none are perfect.

    Each requires specific conditions and none work in every browser without extras installed.

    Flash, Java applets and embedded media players (like quicktime, windows media player, realplayer, etc) need the plugins installed on the browser, but then they work well.

    Javascript/browser embedding/etc are very messy because they are unreliable. IE supports "background sounds" but no other browser does.

    In the end, it's best to pick one of the plugin methods and go with it. Flash is used frequently for movies so that may be possible, but personally I'd use quicktime (my preference for a few reasons, mostly familiarity).

    Windows media is a bad idea (for mac/linux users, even if WM is available, it's a few versions old)
    realplayer is just plain annoying (and I don't trust the installer-- seen too much that looks like spyware, though I'm not sure this is still the case with the current version or actually true, but still... it's an annoying piece of software for other reasons-- such as making it extremely difficult to work with the media... encoding for it is difficult, if nothing else).
    quicktime is mac based originally but very easily available for other operating systems and most users have it (it comes with itunes, it is a main way to play movies if not through flash, etc)

    Flash is a good idea, but can be hard to use if all you want is to play media. It's for bigger projects, in my opinion. It can be workable though, and there are existing players out there also, so do consider this. It's my second choice after quicktime.

    Java [applet] is also for bigger projects, and a whole new language to learn for just this.


    The in-browser methods are more for gimmicky things than real content-- avoid them if this matters.



    Finally, if you really care about everyone hearing this, you can allow several methods like some of the bigger sites do, such as a form where you pick your "preferred player". That requires more setup though.

    There have been a lot of discussions of sounds in webpages here, so search some of the archieves. You can probably get some good info that way also.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

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
  •