Got too much on my hand<p><pre><code>  var OVERLAP = 2500;
  var RECENTLY_PLAYED_NODES_LENGTH = 21;
  var recentlyPlayedNodes = [];
  var audioDurationFix = function(audio) {
    if ($(audio).attr(&#x27;id&#x27;) === &#x27;ive-13&#x27;) {
      return 3.0;
    }
    return audio.duration;
  }
  
  var randomNode = function() {
    var newNode = $(&#x27;#ive-&#x27;+(1+Math.floor(Math.random()*$(&#x27;audio&#x27;).length)))[0];
    if (recentlyPlayedNodes.indexOf(newNode) === -1) {
      recentlyPlayedNodes.push(newNode);
      if (recentlyPlayedNodes.length &gt; RECENTLY_PLAYED_NODES_LENGTH) {
        recentlyPlayedNodes.shift();
      }
      return newNode;
    } else {
      return randomNode();
    }
  }
  
  var playNext = function() {
    var audioNode = randomNode();
    $(audioNode).on(&#x27;timeupdate&#x27;, function() {
      if (audioNode.currentTime * 1000 &gt; audioDurationFix(audioNode) * 1000 - OVERLAP) {
        $(audioNode).off(&#x27;timeupdate&#x27;);
        playNext();
      }
    });
    audioNode.play();
  }
  
  playNext();</code></pre>