Viewing 1 replies (of 1 total)
  • Thread Starter CloudedDottedMind

    (@cloudeddottedmind)

    Hi,

    if anyone is looking for an answer, this is what I’ve ended up with that works:

    If you have a js file inside your child theme:

           var endedHandler = function () {
        		var playHandler = function () {
        			$(".cue-audio")[0].pause();
        			$(".cue-audio").unbind("play", playHandler);
        			$(".cue-audio").unbind("play", endedHandler);			
        		}
        		$(this).on("play", playHandler);
        	}
        	$(".cue-audio").on("ended", endedHandler);
        });

    If you don’t and need to add it somewhere else:

        jQuery(".cue-audio").on("ended", function () {
        var playHandler = function () {
        jQuery(".cue-audio")[0].pause();
        jQuery(".cue-audio").unbind("play", playHandler);
        }
        jQuery(this).on("play", playHandler);
        });
Viewing 1 replies (of 1 total)
  • The topic ‘Disable auto playing next track’ is closed to new replies.