• Resolved Yimwingchun

    (@yimwingchun)


    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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Josh

    (@josh401)

    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…

    Josh

    (@josh401)

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

    … and this one:
    https://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.

    Thread Starter Yimwingchun

    (@yimwingchun)

    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 ??

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    lol @ Josh getting annoyed just envisaging it.

    Josh

    (@josh401)

    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!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Autoplay music’ is closed to new replies.