Permalink
Browse files

Add PLAY and STOP commands to Ruby client library

  • Loading branch information...
1 parent 598e315 commit d575a7d9389fc8cffc388f466aa25a0892a39863 @paulcbetts paulcbetts committed Oct 16, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 extras/gst-playd-client.rb
View
10 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)

0 comments on commit d575a7d

Please sign in to comment.