WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Autoplay music (6 posts)

  1. Yimwingchun
    Member
    Posted 1 year ago #

    I am creating a chinese healing & martial arts website so would like to have tranquil music playing throughout with an option to stop/pause or turn volume down. I can do this easily with many different music player but how do I have music to continue when page is changed and not restart song again. Also on different section of website I want different song to play can I do this. Example - on about page and healing products page soft music and on combat pages to have different song?

    Thank you

  2. Good question. Personally.. I NEVER suggest music auto-playing. There is nothing worse than having 20 browser windows open (I do it all the time).. and music starts blaring out of your speakers.

    The first thing I usually do is frantically start searching for which page is playing that music... and close it out.

    But... you know what they say about opinions ;)

    And.. because your question interests me.. I'm going to search around and see what I can find.

    One moment please...

  3. Okay... I found this link:
    http://stereointeractive.com/blog/2010/08/28/play-music-continuously-across-page-loads/

    ... and this one:
    http://stackoverflow.com/questions/2888113/play-background-music-continuously

    It seems the only way to do this is by loading the music file into a popup... which most browsers will block. Or, by using iframes.

  4. Yimwingchun
    Member
    Posted 1 year ago #

    Ok thank you..yes I know very annoying..thats why I want to give the option to press play before music starts but so that it continues without restarting song after page change.
    Thank you for the help :)

  5. Andrew
    Forum Moderator
    Posted 1 year ago #

    lol @ Josh getting annoyed just envisaging it.

  6. thats why I want to give the option to press play before music starts but so that it continues without restarting song after page change.

    I think that's a wonderful idea! ;)

    Well.. it appears the only way to do it is by loading the audio file into it's own player... which, in turn, gets loaded in it's own iframe.

    An iframe is like a second browser window... but you can control it's size and it's position when it loads.

    This window (iframe) would then remain open and active while the main site is navigated.

    Have you messed with this at all?

    @Andrew, right?! I'm a music lover.. so my speakers are always on and turned up about halfway. Sometimes, it scares the sh*t out of me when music autoplays.. lol! By the way, congrats to you as well on your new WP status. As I told WPYogi, you guys have really been a massive help to the community! I'm so pleased WP chooses their "padawans" wisely ;) Congrats!!

Topic Closed

This topic has been closed to new replies.

About this Topic