Relay.Calling.TapAction
This object returned from tapAsync method that represents the running media tapping active on a call.
Properties
| Property | Type | Description | 
|---|---|---|
| result | Relay.Calling.TapResult | Final tapresult | 
| state | string | Current state of tapping | 
| completed | boolean | Whether the tapping has finished | 
| payload | object | Payload sent to Relay to start tapping | 
| controlId | string | UUID to identify the action | 
| sourceDevice | object | Source device sending media | 
Methods
stop
Stop the action immediately.
Parameters
None
Returns
Promise<StopResult> - Promise object that will be fulfilled with a Relay.Calling.StopResult object.
Examples
Start tapping using RTP and stop it after 5 seconds.
async function main() {
  const action = await call.tapAsync({
    target_type: 'rtp',
    target_addr: '192.168.1.1',
    target_port: 1234
  })
  setTimeout(async () => {
    const stopResult = await action.stop()
  }, 5000)
}
main().catch(console.error)