Class: Vonage::Video::Signals

Inherits:
Namespace
  • Object
show all
Defined in:
lib/vonage/video/signals.rb

Instance Method Summary collapse

Instance Method Details

#send_to_all(session_id:, **params) ⇒ Response

Send a signal to all participants in an active Vonage Video session.

Parameters:

  • :application_id (optional, String)

    (Required unless already set at Client instantiation or set in ENV)

  • :session_id (required, String)
  • :type (required, String)

    Type of data that is being sent to the client.

  • :data (required, String)

    Payload that is being sent to the client.

Returns:

See Also:

  • add docs link


46
47
48
# File 'lib/vonage/video/signals.rb', line 46

def send_to_all(session_id:, **params)
  request('/v2/project/' + @config.application_id + '/session/' + session_id + '/signal', params: params, type: Post)
end

#send_to_one(session_id:, connection_id:, **params) ⇒ Response

Send a signal to a specific participant in an active Vonage Video session.

Parameters:

  • :application_id (optional, String)

    (Required unless already set at Client instantiation or set in ENV)

  • :session_id (required, String)
  • :connection_id (required, String)

    The connection ID of the specific participant.

  • :type (required, String)

    Type of data that is being sent to the client.

  • :data (required, String)

    Payload that is being sent to the client.

Returns:

See Also:

  • add docs link


28
29
30
# File 'lib/vonage/video/signals.rb', line 28

def send_to_one(session_id:, connection_id:, **params)
  request('/v2/project/' + @config.application_id + '/session/' + session_id + '/connection/' + connection_id + '/signal', params: params, type: Post)
end