Madeon over HTTP
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