Class: Chromecast::Channel::Media

Inherits:
Base
  • Object
show all
Defined in:
lib/chromecast/channel/media.rb

Constant Summary collapse

NAMESPACE =
'urn:x-cast:com.google.cast.media'

Instance Attribute Summary

Attributes inherited from Base

#connection, #namespace, #type

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ Media



6
7
8
9
# File 'lib/chromecast/channel/media.rb', line 6

def initialize connection
  super(connection, NAMESPACE, :json)
  @request_id = 0
end

Instance Method Details

#get_statusObject



11
12
13
# File 'lib/chromecast/channel/media.rb', line 11

def get_status
  send(type: 'GET_STATUS')
end

#pauseObject



15
16
17
# File 'lib/chromecast/channel/media.rb', line 15

def pause
  send(type: 'PAUSE')
end