Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Audio Keeps Playing Between Page Loads

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #173174
    minterdewitt
    Participant

    I honestly don’t know if this is possible within WordPress. Can I have a song begin playing on page load and then as you navigate the site by visiting other pages, the song continues to play without stopping and then doesn’t loop after the first play? I don’t want the song to re-start on every page load because having a song playing in the background of a website is already an iffy topic. I just want to set the mood for the website. And the song, “I Wanna Be Your Dog” by Émilie Simon, is rather unobtrusive.

    #173177
    Alen
    Participant

    You can’t. Web is stateless, so as you navigate to new page new ‘state’ is created. To do this properly, your linked content needs to load via AJAX so that the current state can be preserved and music keeps playing. To stop looping all depends what sort of player you’re using.

    #173179
    minterdewitt
    Participant

    Do you know of any WordPress plugins that would allow this? I wouldn’t even know what to search for, other than AJAX music player.

    #173182
    shaneisme
    Participant

    I would personally never start any sound on a website for any reason without the user telling me to start it. Also, I’m fairly certain every mobile browser will not load any auto-play video or audio. I know you probably know this since you mentioned it, but I just wanted to reiterate.

    As for WordPress and AJAX, you’re not looking for an AJAX music player, but a way to make all of WordPress “AJAXified”. I’m sure it’s possible, but it won’t be easy. You might want to find themes that do it for you if they exist.

    Once that’s done, JS is actually calling the PHP functions without a full page postback and you could technically have your music continue to play while PHP is building your new page.

    Sounds like a lot of work for a bad idea :P

    #173189
    minterdewitt
    Participant

    Sounds like a lot of work for a bad idea :P

    Yeah, you’re probably right, @shaneisme. Probably not worth the trouble. Whenever I think of music blaring from my speakers unexpectedly, it’s not a good feeling.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Other’ is closed to new topics and replies.