Disable auto playing next track
-
We love Cue, however, I’m looking to disable the next track auto-playing on a playlist as it is proving very disruptive for our listeners. When looking for how to do this, the solution previously used by others no longer works.
I found this code bit in the plugin files that appears to dictate that the next track should autoplay after one ends, but I do not understand how to prevent it / what to add to my theme’s js file to prevent it.
On line 577 of the file jquery.cue.js :
// Play the next track when one ends. $media.on( 'ended.cue', function() { var index = player.cueCurrentTrack + 1 >= player.options.cuePlaylistTracks.length ? 0 : player.cueCurrentTrack + 1; // Determine if the playlist shouldn't loop. if ( ! player.options.cuePlaylistLoop && 0 === index ) { return; } // Give other 'end' events a chance to grab the current track. setTimeout(function() { $( player.node ).trigger( 'nextTrack.cue', player ); player.cuePlayNextTrack(); }, 250 ); });
This is the file: https://plugins.trac.wordpress.org/browser/cue/trunk/assets/js/vendor/jquery.cue.js
This is the previous solution: https://wordpress.org/support/topic/how-to-stop-playing-at-the-end-of-each-track/
Do you know what code I could add to my jquery theme file to do this?
Thank you
- The topic ‘Disable auto playing next track’ is closed to new replies.