0

How do I access a video file outside webroot using HTML5 Video tag? The src attribute is able to access only the video files under webroot. Any possible solution?

1 Answers1

-1

You can give the absolute URL in the src attribute.

<video controls autoplay>
<source  id="mp4" src="http://media.w3.org/2010/05/sintel/trailer.mp4" type="video/mp4" >
</video>

make sure to set the MIME type properly cause some browsers don't play remote videos if the MIME is not properly set.

Shiva
  • 6,677
  • 4
  • 36
  • 61
  • Thanks. But I meant, outside webroot, but inside the server (a different path, say D drive). Not outside the server – user3065499 Jan 16 '14 at 09:23
  • @user3065499: hi ,check this link , it might solve your problem http://stackoverflow.com/questions/13357994/access-a-file-which-is-located-before-outside-the-server-root-directory – Shiva Jan 16 '14 at 11:46