Class: SignalWire::Relay::StreamAction

Inherits:
Action
  • Object
show all
Defined in:
lib/signalwire/relay/action.rb

Overview

Handle for an active stream operation.

Instance Attribute Summary

Attributes inherited from Action

#call, #completed, #control_id, #result

Instance Method Summary collapse

Methods inherited from Action

#_check_event, #_resolve, #_set_on_completed, #done?, #on_completed, #wait

Constructor Details

#initialize(call, control_id) ⇒ StreamAction

Returns a new instance of StreamAction.



249
250
251
# File 'lib/signalwire/relay/action.rb', line 249

def initialize(call, control_id)
  super(call, control_id, EVENT_CALL_STREAM, %w[finished])
end

Instance Method Details

#stopObject



253
254
255
# File 'lib/signalwire/relay/action.rb', line 253

def stop
  @call._execute('stream.stop', { 'control_id' => @control_id })
end