0

The app serves users and some admins. For every user, there will be a video associated which only the user himself or the admin can view. All the other videos are not accessible by a regular user.

How can I do this?

Placing the videos in some public directory seems impossible, as they would be accessible freely even if I somehow construct the URL.

The only reasonable way to do this(?) seems to me that the request needs to be routed through express, and streamed to the client after some logic evaluates if she can see the video.

transient_loop
  • 5,984
  • 15
  • 58
  • 117
  • It is definitely the right way to do this. – vkurchatkin Nov 19 '13 at 20:47
  • Possible Duplicate - http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js – Jason Nichols Nov 19 '13 at 21:27
  • Well, I have found at @JasonNichols link a hint on how to do it (not really a duplicate, but it helped me further). However I am stuck at how to actually render the video in the client? I can't use a video tag(?), as I'd need to put the url in the src tag...and we want to stream directly to the client, so how to actually render the express response? – transient_loop Nov 20 '13 at 03:19
  • http://stackoverflow.com/questions/4241992/video-streaming-over-websockets-using-javascript – Jason Nichols Nov 20 '13 at 15:30

0 Answers0