Class: Punchblock::Command::Join

Inherits:
Punchblock::CommandNode show all
Defined in:
lib/punchblock/command/join.rb

Constant Summary

VALID_DIRECTIONS =
[:duplex, :send, :recv].freeze

Instance Attribute Summary

Attributes inherited from RayoNode

#client, #connection, #original_component

Instance Method Summary (collapse)

Methods inherited from Punchblock::CommandNode

#initialize, #response, #response=

Methods inherited from RayoNode

#==, class_from_registration, from_xml, #inherit, #inspect, #rayo_children, register, #source, #to_rayo, #to_xml

Constructor Details

This class inherits a constructor from Punchblock::CommandNode

Instance Method Details

- (String) call_uri

Returns the call ID to join

Returns:

  • (String)

    the call ID to join



11
# File 'lib/punchblock/command/join.rb', line 11

attribute :call_uri

- (Object) direction=(other)



19
20
21
22
23
24
# File 'lib/punchblock/command/join.rb', line 19

def direction=(other)
  if other && !VALID_DIRECTIONS.include?(other.to_sym)
    raise ArgumentError, "Invalid Direction (#{other.inspect}), use: #{VALID_DIRECTIONS*' '}"
  end
  super
end

- (#to_sym) media

Returns the method by which to negotiate media

Returns:

  • (#to_sym)

    the method by which to negotiate media



27
# File 'lib/punchblock/command/join.rb', line 27

attribute :media, Symbol

- (String) mixer_name

Returns the mixer name to join

Returns:

  • (String)

    the mixer name to join



15
# File 'lib/punchblock/command/join.rb', line 15

attribute :mixer_name

- (Object) rayo_attributes



29
30
31
32
33
34
35
36
# File 'lib/punchblock/command/join.rb', line 29

def rayo_attributes
  {
    'call-uri' => call_uri,
    'mixer-name' => mixer_name,
    'direction' => direction,
    'media' => media
  }
end