www.webdeveloper.com
Results 1 to 14 of 14

Thread: Open wav file in page

  1. #1
    Join Date
    Feb 2003
    Location
    IL
    Posts
    104

    Open wav file in page

    Ok, i am wanting to find the code to open up a Wav file when you open a page. Is there anything i would have to download or will a simple code jsut work?

    Also how could i turn it into a link so if someone wanted to replay it they could click a link?

  2. #2
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    you can just link directly to the wav, but dont do this if it is a big file. <a href="something.wav">Play me</a> Do you want to embed this and have like a media player stream it or do you want it as a background sound?

  3. #3
    Join Date
    Feb 2003
    Location
    IL
    Posts
    104
    I am wanting it as background music. And it is a big file. It is 30 megs big. It's a full song. So i don't know if it would slow down while you are browseing the site. Oh and i don't want it the stop playing if you enter a diferent part of the site.

    Someone told me it would work if i put something like <bg music="name of wav file">

    Would that work or is it too big? I don't have the file uploaded to my site yet. I am do it as i am typing right now.
    Last edited by georgeafi; 05-02-2003 at 11:52 AM.

  4. #4
    Join Date
    Feb 2003
    Location
    Wales, UK
    Posts
    3,147
    I think it's too big. How about converting to an MP3? http://www.mp3-convertor.com/ is an example - there are loads available.

    About making it play all through the site... perhaps a popup window with the bgsound in it?? Otherwise it will stop when you change page, or restart if you put it on every page.

    dave
    In a world without walls and fences - who needs Windows and Gates?! - Unknown Author
    "And there's Bill Gates, the...most...famous...man in the...ah...Microsoft." -- A TV commentator for the 2000 Olympics.


    Web Design Faq? | W3C | Validator | Accessibility testing | Speed up your PC | Wura | Box Model Research

  5. #5
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    Originally posted by georgeafi
    Would that work or is it too big?
    Way, way, way to big... Anyone with dial-up will be long gone before the .wav file is even close to being loaded. Even those on higher speed, will more than likely be nearly finished browsing before the music loads. A full song should easily be fit into 3 MB of so, if it is a .mp3, and even at that, you are pushing the size...

    Personal website http://www.ryanbrill.com/
    Business website: http://www.infinitywebdesign.com/
    TypeSpace http://www.typespace.org/

    I reject your reality and substitute it with my own!

  6. #6
    Join Date
    Feb 2003
    Location
    IL
    Posts
    104
    Well i have a converter that works both ways. And i have both versions of the song. How would you go by playing the mp3 for background music? The mp3 is 4 megs. Is there mabey a mp3 player i can upload to my site and post it on a page? If anything how could i cut it down so i could at least ust part of it.

  7. #7
    Join Date
    Feb 2003
    Location
    IL
    Posts
    104
    Is there any way at all that i could make this song start pretty much right after someone enters my site? The MP3 is 4 megs. I know i have seen sites that can do this my it's always a band site so they are on huge severs. If there is any way it could make it start right away i would atlest be able to try and do it.

    Heres and examle. It doesn't start automaticaly all the time but it starts right away. Just click on the little speaker on the left side of the "A" of the AFI logo.

    http://www.afireinside.net

  8. #8
    Join Date
    Dec 2002
    Location
    Lake Havasu City, Arizona
    Posts
    527
    Originally posted by georgeafi
    If there is any way it could make it start right away i would atlest be able to try and do it.

    Heres and examle. It doesn't start automaticaly all the time but it starts right away. Just click on the little speaker on the left side of the "A" of the AFI logo.

    http://www.afireinside.net
    If you don't put it on the first page and if you use a preload to load it ahead of time it will play sooner. Check with a search for preload. You can also compress the wav. You have the sound recorder in windows, experiment with it.

  9. #9
    Join Date
    Feb 2003
    Location
    IL
    Posts
    104
    Ok, how do i preload the song? I'm going to open it in a new window mut i want it to preload too. I know you bsically keep the script the same as pre loading a pic except you put the song file name instead of the pic name. But what would the entire script be?
    Last edited by georgeafi; 05-04-2003 at 04:03 PM.

  10. #10
    Join Date
    Dec 2002
    Location
    Lake Havasu City, Arizona
    Posts
    527
    If possible you should be considerate and give the viewers a choice to hear the music or not, but don't force the music on them. Which is why it is best to have them turn it on if wanted. But name the songs for them to see.
    The reasons are many. A few are:

    1 It is not expected and be a shock
    2 It can be too loud and may be disturbing.
    3 Some viewers may not like your style of music
    4 It may send your viewers away

    You do not know who if anyone is listening to the music. You do not know how many viewers are turned away or were unhappy.
    You do know that you are listening though. If you are happy with that fine.
    I am guilty of that too. I did a site a few years ago that I need to update for those very same reasons.

  11. #11
    Join Date
    Feb 2003
    Location
    IL
    Posts
    104
    I know, thats why i said i am opening it in a new window. So if someone doesn't want to hear it they can close the window. Plus the song is from the band the site is all about. What i do need though is the script to preload the song. I want to see if it will load a little quicker.

  12. #12
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    maybe you should just stay away from music unless its for download or if its a a midi. If it gets too big we cant hear it, it will never load

  13. #13
    Join Date
    Feb 2003
    Location
    IL
    Posts
    104
    Well, to be honest i want to have it on my site. If you don't want to hear it just close the box and don't worry about it. It's not that hard. It's one window. The file is about 350kb in size. Its not that big.

  14. #14
    Join Date
    Feb 2003
    Location
    IL
    Posts
    104
    Never mind. I just put it up. If you want to check it out click below.

    http://www.miseriacantare.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles