Forum: Ruby Simple ShoutCAST streamer /w browser

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.
E20e89d58211a3631842daecc1245de2?d=identicon&s=25 Ilmari Heikkinen (Guest)
on 2005-12-26 05:11
(Received via mailing list)
I don't know how interesting this is, but I found it useful for
listening to music on my home computer (tunneled over SSH) while
visiting my folks over the holidays.

It's a quick hack, accepting CGI-using rewrites :)

Download: http://dark.fhtr.org/streamer.rb

Usage example:

apt-get install socat libmp3tag-ruby1.8
cd music
socat TCP4-LISTEN:8080,fork EXEC:'ruby streamer.rb' &
firefox "http://localhost:8080/,"

Open http://localhost:8080/ in an MP3 player to stream all files in
random order.

Append a comma to URL to browse files.
Drag file link to MP3 player to play it.
Drag (stream)-link to recursively stream all files in a directory.
This topic is locked and can not be replied to.