Background music on webpages

Discussion in 'Computers and The Internet' started by Lilyrayne, May 27, 2004.

  1. Lilyrayne

    Lilyrayne Chrisppie

    How do I get music to play in the background when someone opens the homepage of my website? Hardcoding adviced preferred, as I don't have frontpage or any other html editor like that.
     
  2. EllisDTripp

    EllisDTripp Green Secessionist

    Why would you WANT to? :)

    Background music on webpages is almost as obnoxious as popup windows and multiple sets of nested frames....
     
  3. MattInVegas

    MattInVegas John Denver Mega-Fan

    Not to mention the Bandwidth usage!!

    But, to answer the question, it depends on what interface tool you're using. In "Frontpage" it's a easy as adding an image. Open "Page Properties". on the FIRST tab, there's an option to add a Background sound. Almost any filetype works for this, but mp3 takes the least amount of space. wavs take the least bandwidth, with a space tradeoff.
     
  4. Lilyrayne

    Lilyrayne Chrisppie

    Ellis... I'm obnoxious, so my website should be too. :p Ok not really, but I want one of my favorite songs on there.

    Matt, I don't have frontpage anymore :( I have to type out the code itself. You're right about the bandwidth usage though, I didn't even think of that so maybe it's not a good idea after all.
     
  5. 8D-8d

    8D-8d Member

    You can embed a windows media player object into your web page and get it to play a wav or midi file. wavs tend to be a little big for bandwidth. Midi tends to sound horrid and cheesy. Similarly, you could embed a RealPlayer object into your web page and get it to play a streaming realmedia file. This is better on bandwidth, but worse on quality. It is possible to embed these objects and either leave the controls visible or make the whole thing invisible. If you do a search on google for "html tutorials"+"embed audio" you will find the exact code to do whatever you want.

    However, like as the two previous posters said, sound in a web site is very annoying. Even the smallest sounds cause an amount of delay in loading time for your pages. This will result in less visitors.

    Trust us (I've a degree in Computer Science and Internet Technology). Using audio on the web is currently considered bad practice by web developers. I'm sure there are plenty of other ways you can annoy your visitors. A bucket of unretortable raw wit is always a winner.

    Hope this helps.

    Paul :)
     
  6. MattInVegas

    MattInVegas John Denver Mega-Fan

    Maybe someone else could explain better, but the basic HTML code looks something like this: <src="soundfile.ext"> Where ext is the file extention. (mp3, wav, rma whatever it is) and soundfile is obviously the file name. (Duh!) ;) On MY index page, that code was BEFORE the Header command.

    Hope this helps you.
     

Share This Page


  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice