Forum: Ruby on Rails How to proxy streaming video

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
25e788b1783f9d10bb0f580867a19085?d=identicon&s=25 Void (Guest)
on 2008-11-14 19:54
(Received via mailing list)
We have a secure application on the Internet that you have to log into
to use.  We want to be able to display a video from a streaming media
server via this application.  The streaming media server is behind a
firewall so I want my Rails app to proxy the stream to the user so
that the stream is not available unless you log in.

I know I can use send_file to just show the video file, but I prefer
to be able to use the streaming server so that the user does not have
to wait for the file to download before it starts to play.

Any suggestions would be greatly appreciated.

Thanks
8fa0f5c2bf8ad238baa4e20cb0360ebd?d=identicon&s=25 Matt Harrison (iwasinnamuknow)
on 2008-11-15 02:26
(Received via mailing list)
Void wrote:
> Any suggestions would be greatly appreciated.
>
Hi,

If it helps, I believe most good video formats will fake streaming in a
browser, I know flash does this ala YouTube. Also the DivX web player
and
quicktime do it.

HTH

Matt
C64e63b70be7dfed8b0742540b8b27e5?d=identicon&s=25 Mark Reginald James (Guest)
on 2008-11-15 02:44
(Received via mailing list)
Void wrote:
> We have a secure application on the Internet that you have to log into
> to use.  We want to be able to display a video from a streaming media
> server via this application.  The streaming media server is behind a
> firewall so I want my Rails app to proxy the stream to the user so
> that the stream is not available unless you log in.
>
> I know I can use send_file to just show the video file, but I prefer
> to be able to use the streaming server so that the user does not have
> to wait for the file to download before it starts to play.

You could do this by having the action read from a streaming
Net::HTTP get, while writing the fragments to Rails' output
buffer.

Have you also looked into adding a one-time authentication
key to URLs passed to the streaming server?

--
Rails Wheels - Find Plugins, List & Sell Plugins -
http://railswheels.com
25e788b1783f9d10bb0f580867a19085?d=identicon&s=25 Void (Guest)
on 2008-11-15 04:12
(Received via mailing list)
On Nov 14, 6:43 pm, Mark Reginald James <m...@bigpond.net.au> wrote:
>
> You could do this by having the action read from a streaming
> Net::HTTP get, while writing the fragments to Rails' output
> buffer.
>
> Have you also looked into adding a one-time authentication
> key to URLs passed to the streaming server?
>
> --
> Rails Wheels - Find Plugins, List & Sell Plugins -http://railswheels.com

Thanks Mark.  Yes, my next step was to go with some kind of one-time
authentication if I couldn't do the proxying.
This topic is locked and can not be replied to.