<div dir="ltr">I would consider having a third party take care of the video hosting/streaming component. There is a company here in Boston called Wistia (They're also a Rails shop) that does professional video hosting, and their feature list includes "Domain Restriction - Take complete control over your videos by restricting the sites and domains where they can be played." - That might be a good option. I suggest this because it sounds like hosting your own video can get quite complicated. Then you have to think about CDNs, etc. The pricing seems quite reasonable (A free tier, and $25 for a nonbranded video player and 100 videos)<div><br></div><div><a href="http://wistia.com/product">http://wistia.com/product</a></div><div><br></div><div><a href="http://wistia.com/pricing">http://wistia.com/pricing</a><br><div><br></div><div><br></div><div>Good luck!</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 5, 2015 at 9:12 AM, Tom Armitage <span dir="ltr"><<a href="mailto:tom@infovore.org" target="_blank">tom@infovore.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm working on a project that displays HTML5 video in the browser, and access to those videos is controlled.<div><br></div><div>Previously, I was using an expiring S3 URL; now I'm hosting the video myself, attached via Paperclip. The uploads directory is outside the /public directory of the Rails app; there's a URL for the video that, when a user hits it, checks if they're authorised to view it, and if so, uses send_file to send it to them.</div><div><br></div><div>This no longer works very well now that I'm using send_file - I <i>think</i> this comes down to the fact the browser requests video with Range headers, getting it in chunks, and my poor back-end clearly isn't doing something sophisticiated enough.</div><div><br></div><div>My initial thoughts were:</div><div><br></div><div>* something like [<a href="http://stackoverflow.com/questions/6759426/rails-media-file-stream-accept-byte-range-request-through-send-data-or-send-file" target="_blank">http://stackoverflow.com/questions/6759426/rails-media-file-stream-accept-byte-range-request-through-send-data-or-send-file</a>], which odes the chunking manually but is beginning to make me feel stupid, and also feels fragile</div><div>* is Puma the issue, and would a better web server for development work?</div><div><br></div><div>I'm asking because whilst I think I've found the right track, some of you might have had experience of this before.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>t.<br clear="all"><div><br></div>-- <br><div>Tom Armitage<br><a href="http://infovore.org" target="_blank">http://infovore.org</a><br>07813 060578</div>
</div></font></span></div>
<br>_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
Archives: <a href="http://lists.lrug.org/pipermail/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/pipermail/chat-lrug.org</a><br>
Manage your subscription: <a href="http://lists.lrug.org/options.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/options.cgi/chat-lrug.org</a><br>
List info: <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>Jesse Waites</div><div><a href="http://JesseWaites.com" target="_blank">JesseWaites.com</a></div></div></div></div></div></div>
</div>