Relay.Calling.TapAction
Relay.Calling.TapAction
This object returned from tap_async
method that represents the running media tapping active on a call.
Properties
Property | Type | Description |
---|---|---|
result | Relay.Calling.TapResult | Final tap result. |
state | string | Current state of tapping. |
completed | boolean | Whether the tapping has finished. |
payload | dict | Payload sent to Relay to start tapping. |
control_id | string | UUID to identify the action. |
source_device | dict | Source device sending media. |
Methods
stop
Stop the action immediately.
Parameters
None
Returns
coroutine
- Coroutine that will return a Relay.Calling.StopResult
object.
Examples
Start tapping using RTP and stop it after 5 seconds.
import asyncio # to use sleep
action = await call.tap_async(audio_direction='listen', target_type='rtp', target_addr='192.168.1.1', target_port=1234)
# Do other things while tapping the media and then stop it..
await asyncio.sleep(5)
await action.stop()