title: Why will mp4 video not work when http basic authentication enabled?
body: <p>I am trying to get video to play in an HTML5 video tag using the following code:</p>
  
  <pre><code>&lt;video id="video" width="768" height="432" controls&gt;
      &lt;source src="http://example.com/videos/example.mp4" type="video/mp4" /&gt;
  &lt;/video&gt;
  </code></pre>
  
  <p>Initially this was not working and I tracked it down to being an issue with Basic Authentication being enabled on the domain. However, if I try reenabling it in the .htaccess file as follows:</p>
  
  <pre><code>AuthUserFile /folder/containing/.htpasswd
  AuthType Basic
  AuthName "Members Area"
  Require valid-user
  </code></pre>
  
  <p>The video player just stalls on the "Loading..." screen. Additionally if I try to access the file directly the playback in the browser reverts to using the quicktime controls and not the HTML5 controls you get when the authentication is turned off</p>
  
  <p>At present the only solution I have is to remove / avoid requiring authentication in the folder containing the movie files for the site. However, I preferably need to keep the authentication enabled across the whole domain.</p>
  
  <p>Therefore I am wondering if there is a way to serve video content which is located behind basic authentication.</p>
  
  <p>Note: I am currently working to get this working in Safari and hence the focus towards the mp4 format.</p>