Results 1 to 4 of 4

Thread: Pre-loading music

  1. #1
    Join Date
    Feb 2007
    Posts
    21
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Question Pre-loading music

    I hope I've posted this question in the correct forum group. I was wondering if there was a way to pre-load .mp3 files so that when the page they were on was accessed, they would play right away, as opposed to taking forever to load. They're not on the home page of the site. Any suggestions would be appreciated.

    Thanks.

    Peter

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I found this worked:

    <embed src="some.mp3" loop="false" autostart="false" hidden="true">

    I put it in the head of the page but, I think it technically belongs in the body. However, preloading a sound file (aside from there being no javascript sound object that I am aware of) is very much like preloading an image file. It won't make it download any faster and will only be successful in speeding up loading if the file download (caching) is complete before the file is needed. If the file has only partially cached, loading will start over when it is needed. So, it is a good idea (just like with images) to compress the file as much as possible so as to reduce the amount of time required for it to become cached.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Feb 2007
    Posts
    21
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Question

    I've tried that and it didn't really seem to help much. Is there some way of maybe streaming it that would make it faster? Anything in HTML that would help? I'm at a loss on this one.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •