title: protect a file from direct access while displaying the file in html
body: <p>I have a php page that authenticates the user and then would show, in this case a video.</p>
  
  <pre><code>&lt;video class="videos" preload="autoplay"&gt;
  &lt;source src="../assets/videos/video.mp4" type="video/mp4"&gt;
  &lt;/video&gt;
  </code></pre>
  
  <p>I need to protect files like, "mp4, png, jpg, pdf, ect.." from direct access, so anyone can't just type the url location and see the file.</p>
  
  <p>Could the video file be outside the web root and still be embedded on the page with some kind of fetching script?</p>
  
  <p>.htaccess password protection is not a good option for me because users are already logged in to view the page. I would not like to make users submit a second username and password.</p>
  
  <p>Let me know your thoughts </p>