0

How can you use javascript to request a video from a server and then display it with the html 5 video tag? I'm trying to make a password protected area that passes back an mp4 file assuming the user has the appropriate session cookie stored, but I'm unsure what strategies you would use to pre-download the file, reference it in javascript, and then play the video.

ThinkingInBits
  • 10,792
  • 8
  • 57
  • 82
  • 1
    have a look at https://stackoverflow.com/questions/18251632/another-force-chrome-to-fully-buffer-mp4-video for a way to download as an ajax object. of course what you probably want to do is secure the file server side more like this http://blog.offbeatmammal.com/post/2006/06/30/Using-ASPNET-to-restrict-access-to-images.aspx – Offbeatmammal Feb 16 '16 at 03:05

1 Answers1

-2

I suppose this is just one of those things where sitting down with a pencil, piece of paper, and a little creativity does the trick.

ThinkingInBits
  • 10,792
  • 8
  • 57
  • 82