title: HTML5 video element with dynamic source
body: <p>From this topic <a href="https://stackoverflow.com/questions/14190160/html5-audio-element-with-dynamic-source">HTML5 audio element with dynamic source</a> I use this part of code very well:</p>
  
  <pre><code>&lt;audio id="player" controls="controls" autoplay="true" loop="loop"&gt;&lt;source   src="song.php" type="audio/mpeg" /&gt; &lt;/audio&gt;
  </code></pre>
  
  <p>song.php:</p>
  
  <pre><code>$file = "something.mp3";
  header("Content-Type:audio/mpeg");
  header("Content-LEngth:".filesize($file));
  readfile($file);
  </code></pre>
  
  <p>Now I want to do the same with videos mp4.</p>
  
  <pre><code>&lt;video autoplay="true" controls src="video.php" type="video/mp4"&gt;&lt;/video&gt;
  </code></pre>
  
  <p>video.php:</p>
  
  <pre><code>$file = "something.mp4";
  header("Content-Type:video/mp4");
  header("Content-LEngth:".filesize($file));
  readfile($file);
  </code></pre>
  
  <p>but this doesn't work, the video isn't playing. Any idea how I can  prevent to deliver the URL to the video ?</p>