title: How do you change video src using jQuery?
body: <p>How do you change the src of a HTML5 video tag using jQuery?</p>
  
  <p>I got this HTML:</p>
  
  <pre><code>&lt;div id="divVideo"&gt;
    &lt;video controls&gt;
      &lt;source src="test1.mp4" type="video/mp4" /&gt;
    &lt;/video&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This doesn't work:</p>
  
  <pre><code>var videoFile = 'test2.mp4';
  $('#divVideo video source').attr('src', videoFile);
  </code></pre>
  
  <p>It changes the src if I inspect it using firebug, but does not actually change the video being played.</p>
  
  <p>I read about .pause() and .load(), but I'm not sure how to use them.</p>