WordPress.org

Ready to get started?Download WordPress

Forums

How to add audio file thats plays in the background? (6 posts)

  1. acknowledged74
    Member
    Posted 5 years ago #

    Hi

    Does anyone know how I could attach an audio file to play onload in the background of only the home page ?

    Cheers

    Conrad

  2. vietknight
    Member
    Posted 5 years ago #

    <embed src="beethoven.mid" autostart="true" loop="false"
    volume="60" hidden="true"/>

    You can play around with the parameters to fit your GUI needs. The key thing to edit if you want your audio file to play in the bg-onload, is edit the autostart="true".

    Place this code in your index.php and you should be good to go.

  3. acknowledged74
    Member
    Posted 5 years ago #

    Will it only work with .mid tracks I have wmv and mp3 ?

    Thanks by the way

    C

  4. NC@WP
    Member
    Posted 5 years ago #

    acknowledged74,

    Does anyone know how I could attach an audio file to play onload in the background of only the home page ?

    Don't. Most people find it incredibly annoying.

  5. vietknight
    Member
    Posted 5 years ago #

    Any type of audio file should work.

  6. tracyselena
    Member
    Posted 5 years ago #

    Hi I tried this and it doesn't work.
    <embed src="wp-content/uploads/2009/08/HomeAloneSample.mp3" autostart="true" loop="true" volume="60" hidden="true"/>

    I really need to get this audio on the home page.

    And yes I know that I shouldn't and I've spoken to the customer but he really wants it...

    Anyone else have any suggestions on how to add this (just to the home page?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags