Skip to content

Commit

Permalink
Add PLAY and STOP commands to Ruby client library
Browse files Browse the repository at this point in the history
  • Loading branch information
anaisbetts committed Oct 16, 2012
1 parent 598e315 commit d575a7d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions extras/gst-playd-client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d575a7d

Please sign in to comment.