• Resolved drewdir

    (@drewdir)


    Hi all,

    I’d like to find a way for the Cue player to automatically stop playing after going once through the playlist, or even after each song.

    Specifically, I’m using Cue for a front page player embedded in my Audiotheme Nowell theme.

    It’s a little thing, but my client is hung up on it. Anything I can do on my end?

    https://www.ads-software.com/plugins/cue/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Brady Vercher

    (@bradyvercher)

    Hi drewdir,

    Disabling that looping feature requires a little bit of JavaScript. If you’re not sure how or where to add JavaScript, you might try using the Custom JavaScript Editor plugin.

    This snippet should keep the playlist from looping after the last track has played:

    if ( 'undefined' !== typeof mejs ) {
        mejs.MepDefaults.cuePlaylistLoop = false;
    }

    Cheers,
    Brady

    Thread Starter drewdir

    (@drewdir)

    Hey, thanks for the quick reply, Brady.

    I wasn’t able to disable the feature, but I think that could have to do with how well the Custom JavaScript plugin is working. I’m poking through Cue’s JS code files right now using the WP Editor plugin; any easy direction on where I might place this snippet or otherwise edit the code? You’re correct in assuming that I’m a layman, and yes, I know it’s not your job to teach me JS :), so I understand if this is a lost cause.

    Best,
    Drew

    Plugin Author Brady Vercher

    (@bradyvercher)

    The JS in Cue is combined and minified, so it would be difficult to edit that directly and I don’t recommend ever doing that way since your changes will be lost when we release updates.

    It looks like I may have provided the wrong snippet, though. Give this one a shot instead and it should work a little better:

    jQuery.fn.cuePlaylist.defaults.cuePlaylistLoop = false;

    Thread Starter drewdir

    (@drewdir)

    Hey Brady, that did it! Thanks so much! Dropped it into Custom JavaScript and it worked like a charm.

    Best,
    Drew

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How can I make the player automatically stop after one play?’ is closed to new replies.