Created
June 18, 2012 20:21
-
-
Save thomas-mcdonald/2950487 to your computer and use it in GitHub Desktop.
Madeon over HTTP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'gst' | |
require 'sinatra' | |
class App < Sinatra::Application | |
configure do | |
Gst.init | |
@@pipeline = Gst::ElementFactory.make("playbin2") | |
@@pipeline.uri = GLib.filename_to_uri(File.expand_path(File.dirname(__FILE__)) + '/icarus.mp3') | |
end | |
get '/play' do | |
@@pipeline.play | |
end | |
get '/stop' do | |
@@pipeline.stop | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment