Class: VieraPlay::TV
- Inherits:
-
Object
- Object
- VieraPlay::TV
- Defined in:
- lib/viera_play/tv.rb
Instance Method Summary collapse
-
#initialize(control_url) ⇒ TV
constructor
A new instance of TV.
- #play ⇒ Object
- #play_uri(uri) ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(control_url) ⇒ TV
Returns a new instance of TV.
3 4 5 6 7 8 9 |
# File 'lib/viera_play/tv.rb', line 3 def initialize(control_url) @soap_client = Soapy.new( :endpoint => control_url, :namespace => "urn:schemas-upnp-org:service:AVTransport:1", :default_request_args => {"InstanceID" => "0"} ) end |
Instance Method Details
#play ⇒ Object
15 16 17 |
# File 'lib/viera_play/tv.rb', line 15 def play send_command("Play", "Speed" => "1") end |
#play_uri(uri) ⇒ Object
19 20 21 22 23 |
# File 'lib/viera_play/tv.rb', line 19 def play_uri(uri) stop set_media_uri(uri) play end |
#stop ⇒ Object
11 12 13 |
# File 'lib/viera_play/tv.rb', line 11 def stop send_command("Stop") end |