From d575a7d9389fc8cffc388f466aa25a0892a39863 Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Tue, 16 Oct 2012 13:41:35 -0700 Subject: [PATCH] Add PLAY and STOP commands to Ruby client library --- extras/gst-playd-client.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/extras/gst-playd-client.rb b/extras/gst-playd-client.rb index 1c89a05..55039ed 100644 --- a/extras/gst-playd-client.rb +++ b/extras/gst-playd-client.rb @@ -31,6 +31,16 @@ def tags(uri) response_to_tag_dict(@rep.recv) end + def play(uri) + @rep.send "PLAY #{uri}" + return parse_response(@rep.recv).gsub(/.*: /, '') + end + + def stop(id) + @rep.send "STOP #{id}" + parse_response(@rep.recv); nil + end + private def parse_response(msg)