Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 26

Thread: Coding Query

  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Adelaide, South Australia
    Posts
    150
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Coding Query

    Is there any way of coding an html page to prevent a sound file, say an .mp3 or .wav, starting to play before it has fully downloaded to the visitor's computer?
    It gets annoying to people with slow dialup (56k) connections, to hear stop-start-jumping sound on a site, before it fully loads.

    Cheers!
    KB...
    To escape criticism - do nothing, say nothing, be nothing. . . Vaya Con Dios

  • #2
    Regular Coder
    Join Date
    Jul 2002
    Location
    Raleigh, NC
    Posts
    484
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'll tell you whats more annoying, having to wait for the music to load just to see the page! I personally don't reccommend having music and if its a must I would suggest importing it into flash so the size is compressed (at least a little).
    -WebMark Art
    Programming is 80% thinking and 20% spelling

  • #3
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72° W. 48' 57" , 41° N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    uh, in theory, the whole thing has to download before it can play, unless you're doing streaming content, which isn't something you "just do" . so to the best of my knowledge, you shouldn't be experiencing this problem.

    if you are, can we see the code you're using?
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Adelaide, South Australia
    Posts
    150
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm afraid I have to agree with you!
    The sites I'm building are not commercial sites, but 'feel good' pages for lady friends. LOL... They ALL want midis and wavs on them... Small media files are generally ok, but larger ones do or can, frustrate the visitor.
    As far as Flash and Shockwave goes, I'm afraid they are for my 'next' life. As fantastic as they are, learning them ain't easy for an old nerd like me... and my shrink wants me to avoid all unnecessary stresses, anyway!! LMAO
    Cheers!
    KB
    To escape criticism - do nothing, say nothing, be nothing. . . Vaya Con Dios

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    Beyond Lament
    Posts
    424
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I, too, would suggest Flash.

    If you really need to, I've found that placing the sound code at the very bottom of a page seems to work.


    </BODY>
    <EMBED SRC="waltzma.mid"></EMBED>
    </HTML>
    Quíet Storm Designs ~ Art is not what you see, but what you make others see.
    · the Storms· || ·Ultraviolent Winter· || ·Was Einstein Wrong?· || ·It´s About Time!·

  • #6
    Regular Coder
    Join Date
    Aug 2002
    Location
    Sacramento, California
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well while everyone is on the subject of flash. Could someone direct me to a place to learn about how to create flash animation?
    Hairynugs


    Simple is best.

  • #7
    Regular Coder
    Join Date
    Jun 2002
    Location
    Beyond Lament
    Posts
    424
    Thanks
    0
    Thanked 0 Times in 0 Posts
    For beginners, download and install SWiSH:

    http://www.swishzone.com/index.php
    Quíet Storm Designs ~ Art is not what you see, but what you make others see.
    · the Storms· || ·Ultraviolent Winter· || ·Was Einstein Wrong?· || ·It´s About Time!·

  • #8
    Regular Coder
    Join Date
    Jul 2002
    Location
    Raleigh, NC
    Posts
    484
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Flashkit.com is by far the best flash tutorial site I have found. http://flashmove.com/board/ is also a Flash message board to post any specific questions.
    -WebMark Art
    Programming is 80% thinking and 20% spelling

  • #9
    Regular Coder
    Join Date
    Jun 2002
    Location
    Adelaide, South Australia
    Posts
    150
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by joh6nn
    uh, in theory, the whole thing has to download before it can play, unless you're doing streaming content, which isn't something you "just do" . so to the best of my knowledge, you shouldn't be experiencing this problem.

    if you are, can we see the code you're using?
    Here are the 2 test sites where I've embedded a wav into the pages..

    1. http://homepages.ihug.com.au/~dww8/s...script-aa.html
    2. http://homepages.ihug.com.au/~dww8/s...script-bb.html

    The 2 codes used are:
    1... hidden
    </body>
    <p><embed src="misty.wav"
    HIDDEN=TRUE HIDDEN=AUTOSTART loop="true">
    <bgsound src="misty.wav" HIDDEN=TRUE HIDDEN=AUTOSTART loop="true">
    </html>

    2... visible
    <center>
    <p><noembed><BGSOUND SRC="misty.wav"></noembed><embed SRC="misty.wav" AUTOSTART=TRUE
    height=46 width=145 LOOP="true"></embed></center>

    Both play ok in IE6 but as I suggested, stop and start while the files are downloading.

    Cheers!
    KB..
    To escape criticism - do nothing, say nothing, be nothing. . . Vaya Con Dios

  • #10
    Regular Coder
    Join Date
    Jun 2002
    Location
    Adelaide, South Australia
    Posts
    150
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Quiet Storm
    I, too, would suggest Flash.

    If you really need to, I've found that placing the sound code at the very bottom of a page seems to work.


    </BODY>
    <EMBED SRC="waltzma.mid"></EMBED>
    </HTML>
    Thanks Quiet..
    Here is the test site I used your suggested code..
    http://homepages.ihug.com.au/~dww8/s...script-cc.html

    Unfortunately while it loads ok, it still wants to play in stops and starts... at least to a 56k dialup visitor. I agree about where to place the code and always put it right at the bottom of the pages if I can.

    Cheers!
    KB...
    To escape criticism - do nothing, say nothing, be nothing. . . Vaya Con Dios

  • #11
    Regular Coder
    Join Date
    Sep 2002
    Location
    self.location
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yikes! KoalaBear no wonder... You're using actual .wav files for playback, almost 2.4 meg in size!

    Though I noticed you limited the file to 8-bit mon at 11kH, you can mitigate the download time even further by going with any of the various lossy-compression schemes available. Common ones are MP3, Real Audio (or Real Media), Windows Media.

    You could potentially knock off about 90% of the file-size this way.

    Sorry I haven't any real specifics to give you though. Although I've some experience doing high-end audio, I haven't done any audio for web, so the mechanics of compressing the files are a bit beyond my current experience.

    ...

    Regarding autostart only after pageload, IE may have some property which can be reset via JS after all elements have loaded. I'll check into it, and post again if I find anything.

    Cheers -

  • #12
    Regular Coder
    Join Date
    Jun 2002
    Location
    Beyond Lament
    Posts
    424
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You do realize that "misty.wav" is 3-minutes 40-seconds long?
    For .wav file that's huge!

    That's 2.32MB in size... that's bigger than my entire site!
    Quíet Storm Designs ~ Art is not what you see, but what you make others see.
    · the Storms· || ·Ultraviolent Winter· || ·Was Einstein Wrong?· || ·It´s About Time!·

  • #13
    Regular Coder
    Join Date
    Jun 2002
    Location
    Adelaide, South Australia
    Posts
    150
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by realisis
    Yikes! KoalaBear no wonder... You're using actual .wav files for playback, almost 2.4 meg in size!

    ...

    Regarding autostart only after pageload, IE may have some property which can be reset via JS after all elements have loaded. I'll check into it, and post again if I find anything.

    Cheers -
    LOL thanks realisis...
    Yes it is large, but I did convert it back in quality from a much larger size as you noticed. I can compress it even futher as a .wav or as an .mp3 file. but its not the size that is causing the troubles. Even a 500kb sound file takes time to load fully but will still start trying to play before finished. I'm not sure what you are referring to as 'Windows Media' coz the code I used opens my Win Med Player to play the sounds on IE6.

    "Regarding autostart only after pageload"... I think thats what I may be looking for somehow. I'll happily wait to see if you can find something for me. I'm hoping if you can, that it doesnt stop the whole page loading until the sound file does, though.

    Thanks and Cheers!
    KB...
    To escape criticism - do nothing, say nothing, be nothing. . . Vaya Con Dios

  • #14
    Regular Coder
    Join Date
    Jun 2002
    Location
    Adelaide, South Australia
    Posts
    150
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Quiet Storm

    That's 2.32MB in size... that's bigger than my entire site!
    ROFL... Yep, you'll see by my reply to realisis what I did, but true, I would normally only embed very small .mid files or a smaller .wav file when creating pages! The example I used only helped highlight the pre-load playing problem more! LOL...
    Sorry if I shocked ya.

    Cheers
    KB...
    To escape criticism - do nothing, say nothing, be nothing. . . Vaya Con Dios

  • #15
    New Coder
    Join Date
    Sep 2002
    Location
    Up North (UK)
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ^KoalaBear^,
    <EMBED SRC="waltzma.mid"></EMBED>
    This may be totally off the mark, but can you name the EMBED tag and remove its src value. Then create a function that is called from the body's onLoad event that sets the embed's src element.
    The reason I'm not sure about this is that I can't remember if the EMBED element is accessable via the DOM!


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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