Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add PLAY and STOP commands to Ruby client library

  • Loading branch information...
commit d575a7d9389fc8cffc388f466aa25a0892a39863 1 parent 598e315
@paulcbetts paulcbetts authored
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)
Please sign in to comment.
Something went wrong with that request. Please try again.