title: How to free up memory when changing video?
body: <p>How to free up the memory that takes video when the source changes:</p>
  
  <pre><code>var video = document.querySelector('.video');
  var nextButton = document.getElementById('next-button');
  nextButton.addEventListener('click', function() {
      video.src = videoQueue.shift();
  });
  </code></pre>